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: [mg25601] Re: [mg25591] Harmonic Analysis (Harmonic Matching) (Symbolic) in Mathematica
  • From: "Carl K. Woll" <carlw at u.washington.edu>
  • Date: Wed, 11 Oct 2000 03:50:40 -0400 (EDT)
  • References: <200010100143.VAA14034@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

One idea is to use Collect.

For example

In[1]:=
expr = a00 + a10 f[t] + a01 g[t] + a11 f[t] g[t] + a20 f[t]^2 + a21 f[t]^2
g[t];

In[2]:=
f[t] = f1 Exp[+j w t] + f1Star Exp[-j w t];

g[t] = g1 Exp[+j w t] + g1Star Exp[-j w t];

Below I use Collect, with h acting as a wrapper to each of the harmonic
coefficients.

In[5]:=
Collect[expr,{E^(_ t)},h]

Out[5]=
 3 j t w         2
E        h[a21 f1  g1] +

   2 j t w         2
  E        h[a20 f1  + a11 f1 g1] +

              2
  h[a21 f1Star  g1Star]
  --------------------- +
         3 j t w
        E

  h[a00 + 2 a20 f1 f1Star + a11 f1Star g1 +

    a11 f1 g1Star] +

   j t w
  E      h[a10 f1 + a01 g1 +

                                2
     2 a21 f1 f1Star g1 + a21 f1  g1Star] +

              2
  h[a20 f1Star  + a11 f1Star g1Star]
  ---------------------------------- +
                2 j t w
               E

                           2
  h[a10 f1Star + a21 f1Star  g1 + a01 g1Star +

                                j t w
     2 a21 f1 f1Star g1Star] / E

Carl

----- Original Message -----
From: "AES" <siegman at stanford.edu>
To: mathgroup at smc.vnet.net
Subject: [mg25601] [mg25591] Harmonic Analysis (Harmonic Matching) (Symbolic) in
Mathematica


> 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: tracing lines on surface-graphics
  • Next by Date: Re: Tangent on 3d cubic spline
  • Previous by thread: Harmonic Analysis (Harmonic Matching) (Symbolic) in Mathematica
  • Next by thread: Re: Harmonic Analysis (Harmonic Matching) (Symbolic) in Mathematica