Forum Discussion

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

Implementation of PI Controller using VHDL

Hi !

I want to implement PI Controller in FPGA SPARTRAN 3e kit,

using VHDL.

Can anyone guide me .

I am very new in this field.

I studied VHDL 3 years ago, and now have to implement this task.

i have to brush up my VHDL knowledge.

Can anyone guide me step by step.

i will be really obliged.

also i have code in matlab for same PI controller but

i have to convert that to VHDL.

Now it depends should i convert that to vhdl. or else i should write a new code.

Also please provide me some useful links to read VHDL and where i can write small pro grammes as well.

Hope to listen soon :)

6 Replies

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

    The basic task is to port the PID controller algorithm to fixed point arithmetic, deciding about suitable signal and coefficient word length and scaling. You can use MatLab to simulate it's behaviour exactly, but it's probably more easy to do it with Modelsim, if you don't have access to a MatLab fixed point toolbox.

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

    hey thanks for the reply.

    Actually i have decided now to to get VHDL code , i may use system generator Xilinx,

    I have code in MAtlab, and i want to make blocks in simulink and then from simulink to implemnt in System gernator and if i am able to do it scuccesfully i can get vhdl after compilation.......... that is the whole story which i decided to start.

    but the thing is i am not much familiar with simulink and system generator :(.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    In my opinion a PI controller is very simple to be designed directly in VHDL/Verilog code, if you know it's parameters.

    If you want to simulate it than you need a model for the whole system.

    But this a different story.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    the best solution in my opinion is that propased FvM, a algorithm to fixed point arithmetic.