Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How would u create a VHDL code for a PID controller?

Status
Not open for further replies.

saintone1

Technical User
Feb 19, 2002
10
IE
HI,
I have to implement a PID control on a FPGA in VHDL. I really have no idea where to start, and I would be very gratefull if someone could help me.

The program will be reading in a postion signal from an ultrasound, and be controlling the voltage to a fan, which would be flaoting a ping pong ball. THe FPGA will read in a desired point of the ball form the vb user interface, and send a current poistion of the ball, back to the vb user interface. It will read the signal from the ultrasound, and send a signal to either a firing angel circuit, or directly to the motor.

I hope someone can help with this, any help would extremely helpfull.
Thanks a lot,
Joseph Quinn
 
Dear Joseph Quinn,
What I think you shound do is to read the error values of ball position( or better if you have a caliberated fan-speed for the height of the ball) and use that as your input to the PID controller-sample error value at instants( sampling freq. based on a system generated clock). Then your controller output will be the discrete version of the PID algorithm,this can be easily implemented I think from this point on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top