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.