cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,846 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
Highlighted
Advisor
Advisor
1,800 Views
Registered: ‎04-26-2015

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
Highlighted
Mentor
Mentor
1,786 Views
Registered: ‎02-24-2014

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
Highlighted
Observer
Observer
1,738 Views
Registered: ‎02-17-2018

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
Highlighted
Moderator
Moderator
1,528 Views
Registered: ‎02-07-2008

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