<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi,<br>
<br>
Le 07/09/2015 14:26, Jens Simon Strom a écrit :<br>
</div>
<blockquote cite="mid:55ED827C.1070008@hslmg.de" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<pre style="font-family:Courier New;font-style:normal;font-size:13.0;"><span style="color:rgb(0,0,0);"></span>Hi Scilab users,
<span style="color:rgb(0,0,0);">I</span> <span style="color:rgb(0,0,0);">want</span> <span style="color:rgb(0,0,0);">to</span> <span style="color:rgb(0,0,0);">analyse</span> <span style="color:rgb(0,0,0);">a</span> <span style="color:rgb(0,0,0);">microphone</span> <span style="color:rgb(0,0,0);">recording</span> <span style="color:rgb(0,0,0);">of</span> <span style="color:rgb(0,0,0);">the</span> <span style="color:rgb(174,92,176);text-decoration:underline;">sound</span> <span style="color:rgb(188,143,143);">of</span> <span style="color:rgb(188,143,143);">a</span> <span style="color:rgb(188,143,143);">bell</span> <span style="color:rgb(188,143,143);">or</span> <span style="color:rgb(188,143,143);">gong. </span><span style="color:rgb(0,0,0);">Given</span> <span style="color:rgb(0,0,0);">ia</span> <span style="color:rgb(0,0,0);">the</span> <span style="color:rgb(0,0,0);">equidistantly</span> <span style="color:rgb(0,0,0);">sampled</span> <span style="color:rgb(174,92,176);text-d
ecorati
on:underline;">sound</span> <span style="color:rgb(188,143,143);">pressure</span> <span style="color:rgb(188,143,143);">y(t)</span> <span style="color:rgb(188,143,143);">after</span> <span style="color:rgb(188,143,143);">a</span> <span style="color:rgb(188,143,143);">stroke</span> <span style="color:rgb(188,143,143);">for</span> <span style="color:rgb(188,143,143);">10</span> <span style="color:rgb(188,143,143);">s</span>.
<span style="color:rgb(0,0,0);">The</span> <span style="color:rgb(0,0,0);">ansatz</span>
<span style="color:rgb(0,0,0);">y</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(50,185,185);">sum</span><span style="color:rgb(74,85,219);">(</span> <span style="color:rgb(0,0,0);">A_i</span><span style="color:rgb(92,92,92);">*</span><span style="color:rgb(50,185,185);">exp</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(0,0,0);">d_i</span><span style="color:rgb(92,92,92);">*</span><span style="color:rgb(0,0,0);">t</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">*</span><span style="color:rgb(50,185,185);">cos</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(92,92,92);">*</span><span style="color:rgb(218,112,214);">%pi</span><span style="color:rgb(92,92,92);">*</span><span style="color:rgb(0,0,0);">f_i</span><span style="color:rgb(92,
92,92);
">+</span><span style="color:rgb(0,0,0);">alpha_i</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(74,85,219);">)</span> for i=1,2,...5 or more
<span style="color:rgb(0,0,0);">is</span> <span style="color:rgb(0,0,0);">assumed</span> <span style="color:rgb(0,0,0);">to</span> <span style="color:rgb(0,0,0);">approximate</span> <span style="color:rgb(0,0,0);">the</span> <span style="color:rgb(0,0,0);">signal</span> <span style="color:rgb(50,185,185);">where</span> <span style="color:rgb(188,143,143);">A_i</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(0,0,0);">d_i</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(0,0,0);">f_i</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(50,185,185);">and</span> <span style="color:rgb(188,143,143);">alpha_i</span> <span style="color:rgb(188,143,143);">are</span> <span style="color:rgb(188,143,143);">the</span> <span style="color:rgb(188,143,143);">unknown</span> <span style="color:rgb(188,143,143);">amplitudes</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(0,0,0);">danping</span> <span style="color:
rgb(174
,92,176);text-decoration:underline;">factors</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(0,0,0);">frequencies</span><span style="color:rgb(0,0,0);">,</span> <span style="color:rgb(50,185,185);">and</span> <span style="color:rgb(188,143,143);">phase</span> <span style="color:rgb(188,143,143);">angles</span> <span style="color:rgb(188,143,143);">of</span> <span style="color:rgb(188,143,143);">y.</span> <span style="color:rgb(188,143,143);">The</span> <span style="color:rgb(188,143,143);">analysis</span> <span style="color:rgb(188,143,143);">may</span> <span style="color:rgb(188,143,143);">be</span> <span style="color:rgb(188,143,143);">restricted</span> <span style="color:rgb(188,143,143);">to</span> <span style="color:rgb(188,143,143);">the</span> <span style="color:rgb(188,143,143);">lowest</span> <span style="color:rgb(188,143,143);">5</span> <span style="color:rgb(188,143,143);">frequencies</span> <span style="color:rgb(188,143,143);">fi.</span>
<span style="color:rgb(0,0,0);">Does</span> <span style="color:rgb(0,0,0);">Scilab</span> <span style="color:rgb(0,0,0);">offer</span> <span style="color:rgb(0,0,0);">a</span> <span style="color:rgb(0,0,0);">method</span> <span style="color:rgb(160,32,240);">for</span> <span style="color:rgb(0,0,0);">this?</span> <span style="color:rgb(0,0,0);">FFT seems not to be adequate</span><span style="color:rgb(0,0,0);"></span> <span style="color:rgb(0,0,0);">because</span> <span style="color:rgb(0,0,0);">the</span> <span style="color:rgb(0,0,0);">signal</span> <span style="color:rgb(0,0,0);">is</span> <span style="color:rgb(0,0,0);">aperiodic</span> <span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">silence</span> <span style="color:rgb(0,0,0);">after</span> <span style="color:rgb(188,143,143);">10</span> <span style="color:rgb(0,0,0);">s</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">.</span>
<span style="color:rgb(0,0,0);">Is</span> <span style="color:rgb(0,0,0);">nonlinear</span> <span style="color:rgb(0,0,0);">regression</span> <span style="color:rgb(74,85,219);">(with which </span><span style="color:rgb(0,0,0);">I</span><span style="color:rgb(92,92,92);">'</span><span style="color:rgb(0,0,0);">m</span> <span style="color:rgb(0,0,0);">fmiliar</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(0,0,0);">a</span> <span style="color:rgb(0,0,0);">promising</span> <span style="color:rgb(0,0,0);">way</span><span style="color:rgb(92,92,92);">.</span> <span style="color:rgb(0,0,0);">The</span> <span style="color:rgb(0,0,0);">lowest</span> <span style="color:rgb(0,0,0);">frequencies</span> <span style="color:rgb(0,0,0);">can</span> <span style="color:rgb(0,0,0);">probably</span> <span style="color:rgb(0,0,0);">be</span> <span style="color:rgb(0,0,0);">concluded</span> <span style="color:rgb(0,0,0);">from</span> <span style="color:rgb(0,0,0);">a <sp an=""
style="color:rgb(0,0,0);">short</sp></span> <span style="color:rgb(0,0,0);">time</span> <span style="color:rgb(0,0,0);">DFT</span> <span style="color:rgb(50,185,185);">where</span> <span style="color:rgb(188,143,143);">damping</span> <span style="color:rgb(188,143,143);">is</span> <span style="color:rgb(188,143,143);">negligible.</span></pre>
</blockquote>
<br>
Numerical computing necessarily deals with sampled signals, yielding
sampled spectra. Now, there is a duality between sampling and
periodicity: Applying FFT to a sampled signal leads to a spectrum
that is periodic AND sampled. The fact that the spectrum is sampled
means that implicitly the signal you have processed has been assumed
also periodic. This is why boundaries of the sampled signal are of
importance : If due to a "bad cut" S($) is very different from S(1),
then the processing will see this cut as a discontinuity, and the
FFT will yield a non-negligible parasitic power in high frequencies.<br>
<br>
On this point of view, your signal is fine : you start at a power 0
before hitting the gong, and you record the sound down to a very low
amplitude ~0 => it's OK.<br>
<br>
The problem with a simple FFT here is the exp() envelop. The
spectrum of the "undamped signal" is convolved with the spectrum of
exp(), which is an exp(). You can write each d_i = D_i*f_i where
D_i has no dimension.<br>
Analysing this kind of signal has led sismologists to invent wavelet
analysis :)<br>
<br>
If you don't want to use wavelet analysis instead, yes, you may try
with a non-linear regression, with 4*N parameters where N is the
number of frequencies you wish.<br>
You will likely need a first guess: <br>
<ul>
<li>for d_i: just get the envelop of the total acoustic power
fitted with a single exp(-D*t), and set d_i_0 = D</li>
<li>for f_i, alpha_i, A_i: get the FFT of your signal / exp(-D*t),
and get f_i_0, alpha_i_0 and A_i_0 from the most powerful
harmonics.</li>
</ul>
<p>Hope this help<br>
Samuel<br>
<br>
</p>
</body>
</html>