Control of DC servomotor with digital encoder

Post Reply
Simon_says
Posts: 17
Joined: Mon Dec 01, 2008 9:01 pm

Control of DC servomotor with digital encoder

Post by Simon_says » Wed Feb 04, 2009 1:31 am

Hi Lubin...
Hello you all.
This is one of the first projects I made. I am trying to control a DC servomotor with incremental encoder (FAULHABER 1717V0023 this is the link: http://micromo.com/servlet/com.itmr.waw ... =1596#1596 ). The purpose is place a load on the end of a bar attached to the motor shaft and the motor must keep steadily with no move at all. The motor must stay firm as as shown in the drawing attached. So if I change the mass of the load or if I unload the bar, the motor has to stay immobile. This is the model and the C file I am using in a dsPIC30F4012. It seems to work fine, but sometimes when I am pushing or pulling the bar the motor lose control and start running wildly. Can you please tell me if my design is correct, or if I am not considering something important? Why the motor gets crazy?
Thanks for your help.

Jose Luis
Attachments
Motor drawing.JPG
Motor drawing.JPG (8.75 KiB) Viewed 4788 times
myQEI.c
(1.98 KiB) Downloaded 248 times
PID15m.mdl
(47.36 KiB) Downloaded 290 times

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: Control of DC servomotor with digital encoder

Post by LubinKerhuel » Wed Feb 04, 2009 3:18 am

Hi Jose,

I would like to do a case-study with that example if that's Ok with you. I posted few elements on the wiki : http://www.kerhuel.eu/wiki/Case_Study:_ ... f_DC_Motor

You should be able to edit the wiki once you logged-in (different from the forum login system) Feel free to add elements directly in this page, even if pagination i not good.

May I add a link from the example page to this example? Could you tell me is that solve the problem? Could you post the math model of the motor for simulation purpose?

Lubin

Simon_says
Posts: 17
Joined: Mon Dec 01, 2008 9:01 pm

Re: Control of DC servomotor with digital encoder

Post by Simon_says » Thu Feb 12, 2009 9:34 pm

Hi Lubin:
Absolutely you can put this project in a case study and add the link to the example page. I had been working getting the math model of the system. This is the first time I do this so it is taking me some time. I hope I get the math model soon. I´ll post it when I get it. Meanwhile hang on please!

Thanks a lot!

Jose Luis

Simon_says
Posts: 17
Joined: Mon Dec 01, 2008 9:01 pm

Re: Control of DC servomotor with digital encoder

Post by Simon_says » Wed Feb 18, 2009 10:55 pm

Hello Lubin and you all.
Here I got the math model of the motor with the pendulum. I think for simulation purposes this model (servomotor_pendul.mdl) is very close to reality. I have made the changes suggested in order to get a better performance and here it is. It seems to work and I am still testing it. I´ll let you know if something goes wrong. Attached is the new model with th changes suggested. Could you please take a look and suggest?
Thanks a lot!

Jose Luis
Attachments
PID15m1.mdl
(51.66 KiB) Downloaded 267 times
myQEI.c
(1.98 KiB) Downloaded 217 times
servomotor_pendul.mdl
(25.5 KiB) Downloaded 257 times

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: Control of DC servomotor with digital encoder

Post by LubinKerhuel » Mon Feb 23, 2009 10:35 pm

Hello Jose Luis,

I have hardly no time at the moment to have a close look. I'll try later on. Anyway, Feel free to complete the wiki page. Let me know if you get trouble because of right permission to edit it or so...

Lubin

geniusity
Posts: 1
Joined: Thu Dec 06, 2012 7:55 am

Re: Control of DC servomotor with digital encoder

Post by geniusity » Fri Jan 11, 2013 5:14 pm

Hello,
I am really new with this blockset, can u tell me what is the function of the constant 38000 in that model, and also, what is the output of the PID controller and why the input need to be converted before feeding into PID blockset, tq.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest