I have a bunch of simulated time series, for which I can compute the power spectrum. Generally, the simulated power spectrum can be sketched as follows:

enter image description here

I now aim to calculate the features of the theoretical power spectrum. The theoretical power spectrum can be represented by:

$$ S_{th}=\frac{4\left(L/U_{hub}\right)}{\left(1+6f\left(L/U_{hub}\right)\right)^{5/3}} $$


$$ L = constant\ length\ scale $$ $$ U_{hub} = constant\ speed $$ $$ f = frequency\ vector $$

Given Uhub and f (they are "environtmental variables"), the theoretical power spectrum will approach, within a certain tolerance, the simulated one only for a certain defined value of L. This procedure will lead to the following figure:

enter image description here

Therefore, I am interested in developing a method which allows for the extrapolation of the right L value.

I have been thinking of using lsqcurvefit. Up to now I used it this way:

function p_theo = ps_th(x,f)
 L = x(1);
 Uhub = x(2);
 exp = 5/3;
 C = (L/Hub);
 f_x = 6.*f.*C;
 p_theo = 4*C./((1 + f_x).^exp);


But I am evidently using lsqcurvefit improperly, since only L is driving the optimization and Uhub must stay fixed.

Can anyone shed light on this problem?

  • 3
    $\begingroup$ I'm not really sure what you're asking. Did it run and give you bad results? Did it provide an error? Note that optimizing for the right value of $L$ is equivalent to optimizing for the right value of $\frac{L}{U_{hub}}$ if $U_{hub}$ is a constant known a priori. So, you can instead solve for the optimal ratio instead, then calculate what $L$ would be. $\endgroup$ – Jason R Apr 8 '13 at 17:01
  • $\begingroup$ can you average multiple spectra to get a closer approximation to start? $\endgroup$ – endolith Apr 10 '13 at 20:11
  • $\begingroup$ @endolith: yes I can $\endgroup$ – fpe Apr 10 '13 at 20:15
  • 1
    $\begingroup$ To restate @JasonR's point, in your equation, $L$ and $U_{hub}$ are not independent variables. Only $C$ is. $\endgroup$ – craigim Apr 10 '13 at 23:25
  • $\begingroup$ I can't understand this program,can you send me full code of Power Spectrum Density. I want that my result should be look like above fig. So,please send me full code to my mail-id- bappa.ism@gmail.com Thanking you Bappa Mukherjee Student of Applied Geophysics. I.S.M. Dhanbad-826004. India. $\endgroup$ – user7593 Jan 18 '14 at 15:32

Your Answer

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

Browse other questions tagged or ask your own question.