[DSP homepage]

Lab Exercise:

Digital Sinusoidal Oscillators:
Difference Equation vs. Direct Evaluation

The goal of this exercise is to design and implement an experiment to determine how fast discrete-time samples of sinusoids can be generated on a PC. Execution times of two approaches will be measured:

  1. direct evaluation of the samples of a sinusoid using the sin( ) function in the standard C/C++ library, and
  2. evaluation of the samples of the same sinusoid using a difference equation implemented in C/C++.

You must design your code to measure how fast samples of

sin( 2 pi f1 t - phi)

can be evaluated using the two approaches. Use the values for f1 and phi assigned to you. [frequency and phase assignments]. Samples should be taken at 8000 Hz, starting at t = 0.

Design your experiment well so that results generated are as accurate as possible.

 

 


 

This page has been accessed
Counter
times since November 26, 2002.

Last updated: November 26, 2002
lui_agustin@yahoo.com
1