🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #1063

re: discrete sin fuction programming (conclusion)

#1063
From: jkchan
Date: Fri, 26 Oct 1990 13:21
46 lines
2028 bytes
A week ago I asked for help for the discrete sin function programming
probelm I met.  Thanks for the responses.  All of you are very helpful
and my problem has been solved.

My original problem was frequency change in a sinusodal sine wave.  
For those who knows calculus, that is easy to understand:

In general:    y = M sin x     with w = dx/dt = 2 PI f

Now, for a constant frequency sine wave, f = f0,
               dx = 2 PI f0 dt
which integrates to
                x = 2 PI f0 t + c          (if we set x=c when t=0)
Hence,          y = M sin (2 PI f0 t + c)   
which is the well-known simple (constant frequency) sinusodal equation.

But, for a linear frequency changing waveform, f = f0 + k t,
where k is a proportionality constant,
we have     
               dx = 2 PI (f0 + k t) dt
which integrates to
                x = 2 PI f0 t + 2 PI k t**2 / 2 + c
where c is the integration constant.
Then            y = M sin (2 PI f0 t + 2 PI k t**2 / 2 + c)
which is the correct model for a linear frequency changing sinusodal waveform.

My mistake was that I just change the frequency of the constant frequency
sinusodal equation from
                y = M sin (2 PI f0 t + c)
to
                y = M sin (2 PI (f0 + k t) t + c)
which expands to
                y = M sin (2 PI f0 t + 2 PI k t**2 + c)
and is incorrect.

You can see the 1/2 factor is missing in the incorrect equation.  Very 
interesting!  Thanks a million to all of you.  I appreciate it.

Jim


-- 
Jim Chan
Hearing Lab
Communication Sciences and Disorders
School of Special Education
Technical Details
Message-ID: <1990Oct26.132100.12254@rodan.acs.syr.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!psuvax1!rutgers!njin!uupsi!rodan.acs.syr.edu!jkchan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!psuvax1!rutgers!njin!uupsi!rodan.acs.syr.edu!jkchan
From: jkchan@rodan.acs.syr.edu
Newsgroups: comp.unix.programmer,comp.os.os2.programmer
Subject: re: discrete sin fuction programming (conclusion)
Message-ID: <1990Oct26.132100.12254@rodan.acs.syr.edu>
Date: 26 Oct 90 13:21:00 GMT
Sender: jkchan@rodan.acs.syr.edu
Organization: Syracuse University, Syracuse, NY
Lines: 46