simple way to add harmonics to a fundamental signal

Martin Czech martin.czech at intermetall.de
Wed May 26 13:03:14 CEST 1999


Martin Czech wrote:

> What about x=0 and x<0.
> If we aggree that a real value is returned, we have problems
> with both, x**n amd log(x).

That's true, log(x) is undefined in real numbers set for negative
x and x=0. However, since any complex number may be expressed as
some power of e, the definition of log(x) also may be extended.
Define j=sqrt(-1).
Then exp(a+jb)=exp(a)*exp(jb). Since we do not need our log(x) for 
any complex argument, only for positive and negative real values,
the term exp(jb) may be used just to express the sign:
exp(j0)=1, exp(jPI)=-1,
and exp(a) is responsible for the magnitude. In such case, our 
formula looks like: x**n=sign(x)*exp(n*log(|x|)), 
which is not true for even values of n, but useable.

What about x near 0 ? Well, log(|x|) goes to minus infinity, not
realizable in real circuits, but hey, we do not really need these
infinite values, we can harmlessly clip them, since exp(-inf)=0.
Note, that for input signal values close to zero, their n-th power
is even closer to zero. I think that it should not even cause any
oddities at the output.

On the other hand, I realised that you don't even need to generate 
all these powers of x to transform sin(x) into sin(n*x).
Apart from the recursive definition of Czebyshev polynomials,
there is a direct one:
Tn(x)=[(x+sqrt(x**2-1))**n+(x-sqrt(x**2-1))**n]/(2**n)
so, only calculating the n-th power is required.
The question is, whether it is possible to avoid calculating log's
of non-positive argument, due to the (x+sqrt(x**2-1))**n and 
(x-sqrt(x**2-1))**n terms.

So far, I don't know, how to handle (x-sqrt(x**2-1))**n, but
the definitions:
ar sinh(x)=log(x+sqrt(x**2-1)) and ar cosh(x)=log(x+sqrt(x**2-1)
look very interesting. ar sinh(x) and ar cosh(x) are the inverse
hyperbolic functions. It is known, that ar sinh(x) quite well models
the transition characteristics of differential pair of bipolar trannys,
so it is very easily realisable.


For me, the next very interesting question is whether it is possible,
to extend the relation:

2*(n-1)*Tn(cos(x))=cos(n*x)

to any real n. Of course Tn() no longer is a polynomial. But imagine the
great potential usefullness of such transformation. For example, having
a stable source sine oscillator, it would be possible to impose a frequency
modulation onto its output wave.

regards,

m.b.


--

Maciej Bartkowiak
========================================================================
Institute of Electronics and Telecommunication     fax: (+48 61) 8782572
Poznan University of Technology          phone: (+48 61) 8791016 int.171
Piotrowo 3A                             email: mbartkow at et.put.poznan.pl
60-965 Poznan POLAND               http://www.et.put.poznan.pl/~mbartkow
========================================================================




More information about the Synth-diy mailing list