UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer los_galacticos
Observer
1,537 Views
Registered: ‎02-17-2018

PID DC motor control

Hi everyone. I want to design pid implementation for dual dc motor control. I am using the Spartan 3- starter kit board. I have ultrasonic range sensor and i can show the object's range on seven segment display as centimeter. And also, i can control dual dc motor by using pwm technique on fpga board. But, i can not put everything together. 

 

I can get distance value as centimeter and i can control dc motor by using pwm technique but how can i put pid on it? or how should i write pid code? Could you please help me to get rid of this chronic issue?

 

Thaks.

Tags (1)
0 Kudos
4 Replies
Scholar u4223374
Scholar
1,491 Views
Registered: ‎04-26-2015

Re: PID DC motor control

What is the controlled variable? Distance to target? Velocity?

 

Distance to target is potentially a tricky one as it requires the ability to reverse the motor - and most motors/controllers aren't going to give a linear response around that region.

0 Kudos
Scholar jmcclusk
Scholar
1,477 Views
Registered: ‎02-24-2014

Re: PID DC motor control

This is a duplicate post, and I already replied with a solution here:

 

https://forums.xilinx.com/t5/Spartan-Family-FPGAs/PID-control-implementation-for-DC-motor-control/m-p/860169/highlight/true#M37031

 

 

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Observer los_galacticos
Observer
1,429 Views
Registered: ‎02-17-2018

Re: PID DC motor control

i want to control dc motor's speed. But i have range sensor not speed sensor. That's why i tried to change distance value to mean value speed by using trigger time of range sensor. Than, i send the information as speed into pid block. Actually i did this but when we look at the whole part of this design, is the system has PID  control ? if it is ok , where the pid control is? This is my main problem. 

 

 

0 Kudos
Moderator
Moderator
1,219 Views
Registered: ‎02-07-2008

Re: PID DC motor control

Hi @los_galacticos, have referred to @jmcclusk's reply on your duplicate post? Please do not post the same query on multiple boards.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos