Cypress Developer CommunityTM

Simple DDS [State Variable, IIR]

Summary: 12 Replies, Latest post by JLS1 on 25 Oct 2013 06:03 AM PDT
User
7646 posts

Here is a DDS approach another poster turned me on to, very fascinating.

Think State Variable, second order, 2 integrators + sign change = oscillator. Or think

second order IIR with positive feedback.

Runs just from C code, 80 uS ( 12.5 Khz ), 40 samples/sine.

With optimization, conversion to fixed point, binary size elements, ASM vs C, or HW solution,

should yield much higher freq.

Add a timer to control code placed in ISR, eg.  sample period, or just use a delay function to control sample rate.

Regards, Dana.

Attachments:
User
7646 posts

Forgot to include this reference -

www.ee.ic.ac.uk/pcheung/teaching/ee3_Study_Project/Sinewave%20Generation(708).pdf

Regards, Dana.

User
7646 posts

The other way of tuning the DDS is of course keeping poles on unit circle.

Regards, Dana.

User
1362 posts

Interesting approach

User
124 posts

Hi Dana

This is great idea many thanks.

I´m testing it tuning frequency with ISR and working fine !

Is possible making with similar method Karplus Strong synthesis ?

Kamil

User
7646 posts

I would think so. One could take the transfer function, and factor the

sinusoidal component from the rise/decay element transfer function.

Or implement the transfer function directly in IIR form. Looks like an

even simpler function from inspection.

User
7646 posts

A couple of references. Note the Stanford f(t) just looks like a damped sine,

so seems like straightforward cascade of sine generator and exponential decay

block.

music.columbia.edu/cmc/musicandcomputers/chapter4/04_09.php

ccrma.stanford.edu/~jos/lab_inst/lab_inst.pdf

Regards, Dana.

User
7646 posts

I have not yet tried this but seems if you recompute the coefficients of the

diff eqn. for binary  value, like 32 or 64 (samples/sine, sample rate), might

get tighter code loop, eg. higher frequency out of the design. Food for thought.

Regards, Dana.

User
124 posts

Many thanks interesting references.

Kamil

User
124 posts

Hi Dana

I´m implementing simple component from your great IIR filter sine idea.

Kamil

Attachments:
User
124 posts

My simple questions - is possible make this IIR sine with DFB component ? (respective karplus strong DFB ?)

Thanks info Kamil