I am new to signal processing. The equations below are given in $LaTeX$.

I have the following transfer function (from the Dryden Model) for the two-sided Power Spectral Density:

$$S(w) = \frac{\sigma_u ^2 \tau_u}{\pi} \frac{1}{1+(\tau_u w)^2}$$

I would like to plot the above as: Power Spectral Density, dB vs. w

Any help on this would be appreciated. (please use any numerical values for $\sigma_u, \tau_u$)

I also need to calculate the auto-correlation function by taking the inverse Fourier transform (call it R(s) ) of S(w).

Finally, I want to compute

$$S1(w) = \int_{0}^{\infty} R(s) \cos (ws) ds$$

I would really appreciate someone's kindest help and advice in this regard. Thank you!


L := 50
Umc := 4.31
Su[ω_, σ_, τ_] := (σ^2 *τ/π )*1/(1 \
+ (τ *ω)^2)
Sw[ω_, σ_, τ_] := (σ^2 *τ/(2*π \
))*(1 + 3*(τ* ω)^2)/(1 + (τ*ω)^2)^2

Ru[s_] := InverseFourierTransform[Su[ω, 1, L/Umc], ω, s]

S2 [ω_] := Integrate[Ru[s]*Cos[2*ω*s], {s, 0, Infinity}]

Plot[S2[ω] , {ω, 0, 1}]
  • $\begingroup$ You can get your latex to show as Mathematica code like this: ToExpression["S(w) = \\ frac{\\ sigma_u ^2 \\ tau_u}{\\ pi} \\ frac{1}{1+(\\ tau_u w)^2}",TeXForm] and this gives !Mathematica graphics $\endgroup$ – Nasser Mar 22 '14 at 20:22
  • $\begingroup$ @Kuba Yes it is $\endgroup$ – Stoc Mar 22 '14 at 20:26
  • $\begingroup$ @Nasser thanks so much...I'll keep this in mind for next time $\endgroup$ – Stoc Mar 22 '14 at 20:26
  • $\begingroup$ Please do not post the same question on multiple sites (this is to avoid duplicated efforts). If you're doing this in Mathematica, please include the relevant code. $\endgroup$ – rm -rf Mar 22 '14 at 20:37
  • $\begingroup$ @rm-rf sorry about that....i have deleted my other post..i have no idea as to which functions in mathematica can do this for me so unfortunately i have no code at the moment. $\endgroup$ – Stoc Mar 22 '14 at 20:46

If you simply want a dB PK ω plot you can use the built-in BodePlot function.

s[ω_, σ_, τ_] := σ^2 τ/π 1/(1 + (τ ω)^2)

BodePlot[Tooltip[s[ω, 1, 2]], ImageSize -> 550, Frame -> True, 
            PlotStyle -> {Directive[Thick, ColorData[20, 1]], 
            Directive[Thick, ColorData[20, 9]]}, Frame -> False, 
            AspectRatio -> 1/2.25, GridLines -> Automatic, 
            GridLinesStyle -> Directive[GrayLevel[0.7], Dashed]]

Mathematica graphics Mathematica graphics

I will leave the rest to you - Integrate and InverseFourierTransform should do the trick :)

  • $\begingroup$ thanks for the help...I am having a problem in plotting now..my function S2[w] outputs values for {w,0,1} but nothing shows up on the plot...i have no idea what I am doing wrong...i'll put the comment above...can you please take a look? sorry for the trouble. $\endgroup$ – Stoc Mar 23 '14 at 0:02
  • $\begingroup$ @Stoc Have you resolved the plotting issue ? $\endgroup$ – Sektor Mar 25 '14 at 9:17

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.