Control of DC servomotor with digital encoder
-
- Posts: 17
- Joined: Mon Dec 01, 2008 9:01 pm
Control of DC servomotor with digital encoder
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
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 (8.75 KiB) Viewed 15928 times
-
- myQEI.c
- (1.98 KiB) Downloaded 702 times
-
- PID15m.mdl
- (47.36 KiB) Downloaded 744 times
-
- 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
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
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
-
- Posts: 17
- Joined: Mon Dec 01, 2008 9:01 pm
Re: Control of DC servomotor with digital encoder
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
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
-
- Posts: 17
- Joined: Mon Dec 01, 2008 9:01 pm
Re: Control of DC servomotor with digital encoder
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
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 720 times
-
- myQEI.c
- (1.98 KiB) Downloaded 676 times
-
- servomotor_pendul.mdl
- (25.5 KiB) Downloaded 718 times
-
- 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
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
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
Re: Control of DC servomotor with digital encoder
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.
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.
Who is online
Users browsing this forum: No registered users and 12 guests