MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Harmonic Analysis (Harmonic Matching) (Symbolic) in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25598] Re: Harmonic Analysis (Harmonic Matching) (Symbolic) in Mathematica
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 11 Oct 2000 03:50:38 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <8rtsoq$dpd@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

insert your definitions and expand the polynom

expr = a00 + a10 f[t] + a01 g[t] + a11 f[t] g[t] +
a20*f[t]^2 + a21 f[t]^2 g[t] + 
        andSoOn /. {f[t_] :> f1*Exp[I*w*t] + f2*Exp[-I*w*t],
        g[t_] :> g1*Exp[I*w*t] + g2*Exp[-I*w*t]} // Expand


and here are the first harmonic

Plus @@ Cases[expr, a_.*Exp[I*w*t]]


Regards
  Jens

AES wrote:
> 
> How can one do symbolic harmonic analysis (aka "harmonic matching") in
> Mathematica?
> 
> That is, I'd like to insert sinusoidal functions f[t] and g[t] written as
> 
>    f[t] = f1 Exp[+j w t] + f1Star  Exp[-j w t]
> 
>    g[t] = g1 Exp[+j w t] + g1Star  Exp[-j w t]
> 
> into a polynomial in f[t] and g[t], e.g.
> 
>    expr = a00 + a10 f[t] + a01 g[t] + a11 f[t] g[t]
>                     + a20 [f[t]^2 + a21 f[t]^2 g[t] + and so on
> 
> and then pull out the individual harmonic components, i.e. the
> Exp[+j w t], Exp[-j w t], Exp[+2 j w t], Exp[-j w t], etc., components.
> 
> (This may not be what some people call harmonic analysis, but it's a
> common approach in engineering analysis of nonlinear systems.)
> 
> A simple way to do this?
> 
> (Note: the coefficients may themselves be expressions that contain
> factors like Exp[constant] -- though not t explicitly.]
> 
> Thanks,   AES


  • Prev by Date: Re: Re: problem with nonlinearfit
  • Next by Date: Making Big Substitution List
  • Previous by thread: Re: Harmonic Analysis (Harmonic Matching) (Symbolic) in Mathematica
  • Next by thread: Making Big Substitution List