0
$\begingroup$

I have a damped, tuned circuit and want to measure its Q factor. The hardware sends an impulse 'ping' and samples the output as it rings down.

Is there an efficient way to fit an equation of the form $A e^{t(i\omega + b)} $ to a series of samples? I know $\omega$ up front, and $A$ isn't relevant. I am primarily interested in the value of $b$.

For my system the Q factors I want to measure are in the range 2-5, and the amplitude of the noise is about 10% of the signal.

My current solution uses a Goertzel filter to measure the energy at the frequency of interest for each of the successive cycles, then looks for the point where the magnitude drops by a quarter. With some interpolation between the cycles before and after the quarter point, this gives reasonable but not great results. It is especially bad for the low end of the Q range.

$\endgroup$
  • $\begingroup$ There is impossible to fit a real valued function onto a complex valued model.................. Do you mean $\mathbb{Re}(Ae^{iwt-bt})$ better?. $\endgroup$ – Brethlosze Dec 8 '16 at 1:31
  • $\begingroup$ Yes, I should of said the real part. I'd like to avoid hardcoding the phase relationship between the impulse and the start of the sampling, so $A$ is complex. $\endgroup$ – Phil Dec 9 '16 at 11:47
  • $\begingroup$ Why A is complex... That is not correct... Better express the phase as just you are doing.... with explicit real and imaginary parts, so all your parameters are real $\endgroup$ – Brethlosze Dec 14 '16 at 15:13
3
$\begingroup$

Our system has the impulse response (why we changed to imaginary instead of real? :) ): $$h(t)=\mathbb{Im}(Ae(iwt)e(-bt))=Ae^{-bt}sin(wt)$$

With the following structure (ref.) (discretized): $$H(s)=\frac{Kw}{(s+b)^2+w^2}$$

Under matlab, you only need to use procest:

procest(data,'P2U');

Which models the same structure under the form: $$H(s)=\frac{K}{(1+2\zeta T_ps+T_p^2s^2)}$$

$\endgroup$
  • 1
    $\begingroup$ Considering this a System Identification task is a great idea, I'm just reading up on this now. I need to do this in real-time on a (32 bit) microcontroller, so will need to understand the MatLab implementation. $\endgroup$ – Phil Dec 9 '16 at 12:00
  • $\begingroup$ You actually dont need the matlab implementation, just the proper arrangement of an LS estimation, which is very cheap to implement, and then convert the ARX parameters onto the physical process parameters - which could be a whole new question :) $\endgroup$ – Brethlosze Dec 14 '16 at 15:10
  • 1
    $\begingroup$ I'm just reading "Least Squares Parameter Estimation of Continuous- Time ARX Models from Discrete-Time Data". If I understand correctly the solution is start with the differential equation definition of damped simple harmonic motion; then fit an estimator for a sample given the previous 2 samples to the data; then extract the parameters I care about from that? $\endgroup$ – Phil Dec 15 '16 at 14:07
  • $\begingroup$ yeah, something like that :)... $\endgroup$ – Brethlosze Dec 19 '16 at 16:52
  • $\begingroup$ I've implemented this, and the results are very sensitive to measurement noise (I'm using a simple discrete estimator for $d^2y/dt^2$) Is there a standard solution to this? $\endgroup$ – Phil Jan 6 '17 at 14:41

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.