Please help me out with VHDL code for sine wave with proper explanation

Status
Not open for further replies.

mohit1108

Newbie level 2
Joined
Mar 31, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
I am an electrical engineering student and working on the speed control of PMSM motor using FPGA kit SPARTAN 3E. I need sine wave generator code for 2-3 phase converter application

ia = sin θ. iq
ib = sin (θ-2Π/3). iq
ic = sin (θ+ 2Π/3). iq


iq= 8 bit input and θ is also a 8 bit input
ia,ib,ic are all 8 bit outputs. I need the VHDL code for getting ia,ib,ic
 

This is most commonly solved using a DDS/LUT. Normally, the table would be compressed, but that isn't needed here. You can use a single BRAM to store all 256 samples of phase A, and even all 256 samples of phase B (which are slightly offset from phase A). Phase C can be constructed from phase A and phase B. from here, the built in 18x18 multipliers can be used, followed by your choice of rounding scheme.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…