thank you ,my goal is implement a function a*sin(wt+&)+b*sin3*(wt+&)
& is initial phase, so i think i should known how to implement sin function at first, do you thinck is it right?
You can use DDS (Direct Digital Synthesis).
It's a very usefull technology.
All you need is a microcontroller with a PWM output and a simple RC filter.
details of creating sine wave using DDS could be found in video demustified ebook, or direct digital synthesis demustified , both posted in ebooks section @ elektroda