Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Need a crash course in FPGAs

I just, uh, "discovered" FPGAs about a week ago and from what I've learned so far, they seem perfectly suited for vector control of an induction motor, compared to running a 100k lines of C code through a DSP.

The big, surprisingly basic problem I've run up against is that I don't have a clue as to how to start using them!

In the end I might decide to just license IP from someone else, but I'm the kind of engineer that can't totally outsource even a piece of a design - I have to have at least a vague understanding of what is going on inside, e.g., the microcontroller running my megawatt power conversion hardware.

So far it seems to me that MATLAB/Simulink in conjunction with, e.g., DSP or SOPC Builder would allow me to translate block-level models into working hardware the quickest, but I'm not 100% sure of that. I also know that MATLAB is pretty pricey software for a small company like ours, but maybe it isn't so bad compared to licensing someone else's IP?

Anyway, my goal is to make an FPGA with enough processing power and ADCs in it to do vector control (field oriented [FOC] or direct torque [DTC]) with space vector modulation of an induction motor. A separate microcontroller running our standard UI will tell the FPGA how much torque it wants from the motor (with RPM a secondary consideration) and the FPGA will do all the tedious calculations that would otherwise cripple all but the fastest DSPs.

I might end up licensing IP from someone else - but I'd really like to know what goes on first to make an informed decision one way or the other.

Thanks for any help!

13 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Why can't I design the hardware then have Quartus tell me which devices will work?

    --- Quote End ---

    You can. Just set Quartus to auto select and it will chose a device to fit your design into. But in many cases, you need to design the board the same time you're designing the firmware. But its usually the IOs that is the most important.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I also know that MATLAB is pretty pricey software for a small company like ours, but maybe it isn't so bad compared to licensing someone else's IP?

    --- Quote End ---

    I'm unsure of the extent of your requirements, but you could look at some opensource alternatives to Matlab/Simulink, such as Octave/Scicos or SciLab. I did a quick search and found Scicos-HDL:

    http://scicoshdl.sourceforge.net/projectscreenshots.html

    which may or may not help depending on your requirements.

    Remember that these projects are done independently of Altera or Xilinx (unlike MATLAB/Simulink) so I'm not very sure how well it would work. Worth giving it a try though, it's free anyway.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have been doing Field Oriented Control in FPGA's before, well, it was even considered, going back to 2001 timeframe. Back in 1999, when I started, it was considered crazy. Now, beginning around 2005, every IEEE publication has a "FPGA" motor control topic. In short, I would say that it is getting more and more difficult for the DSP to compete with the FPGA, not only in terms of performance, but also cost. An Altera EP3C10 device in TQFP144 is very competitive . . .

    There are many issues for you to address to build your design in an FPGA, and doing an induction machine controller is the most advanced AC drive versus even a permanent magnet synchronous machine (PMSM) or switched reluctance machine.

    In short, I would suggest the following:

    1. VHDL or System Verilog

    2. Aldec Active-HDL cosimulation with Matlab/Simulink (I prefer this over Modelsim's solutions, as Aldec has a simple option for cosimulation versus buying yet another add on tool.)

    3. Development boards

    4. Go with fixed point implementation first, particularly on the PI controllers. I have had good performance with fixed point, and cosimulation between Simulink and your RTL simulation (Aldec) will give you good scaling results.

    I have development kits available if you are interested.

    James Bonanno

    Atlantix Engineering