pd controller constants for computer animation

Hi,
I have read the articles on PD controller and understood the basics but I am not able to figure out what constants I have to use for Kp
and Kd. My system is as follows (it is a computer animation):
I have three bars representing the lower leg, upper leg and the torso of a human body. Each of these bars have weight 1kg and have dimensions of 0.2 width and 5.0 height. The torso is connected to the upper leg with a hinge and the hinge is at the lower left corner of torso (which is the upper left corner of the upper leg). There is a similar hinge between upper leg and the lower leg (at the corresponding position). The lower leg is attached to the ground using a hinge at the lower left corner of the lower leg. I want to control the angles of these bars using a PD controller (there will be a PD controller for each hinge). I am not able to figure out a logical way of getting the Kd and Kp constants for each of the controllers (I have been selecting the constants randomly) and my system is not working.
Is there any way of logically finding the constants which solve my purpose or if someone has done this kind of simulation before, can you suggest a better way of choosing the constants?
Thanks Jeevan.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
You might consider a direct matrix or dynamic matrix control technique for a robotic situation. Since the elements are interacting, there could be some advantage in the more advanced techniques. That might allow you to put in a good mathematical model of the leg system and use it to control directly.
If you are simply looking at controlling the angle of each joint, consider determining how fast you wish the leg to appear to move per pole time. Let the poll time equal your frame rate. In this case, I would start with a standard P controller, and increase the gain until the leg looked like it was moving quickly enough. Let the angle w = w old + K(error)* frame interval. I would then add a little D action to slow it down as it approached setpoint. I don't think humans operate with a great D component in our movement. We generally use an adaptive P model, with a lot of P values for different situations. D would imply using a second muscle to slow things down.
If you are modeling the strength which is needed to push the leg around under various circumstances, then you really should go to a more advanced control. I think a realistic whole leg model is beyond the limits of PD.
Michael

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Yes, of course. Study recursive least squares, pole placement and dead beat controllers. I think Michael is right about the PD not being adequate. Even if you keep it simple and want to use a PD then you should have a low pass filter on the differentiator which effectively leaves you with a lead filter. Also, a PD controller is not the best controller for a second order system. It is impossible to have PD controller and a second order system with imaginary poles that won't oscillate. This is due to the resulting transfer function having imaginary poles and animation control should only have real poles. If fact a lead filter can't result in a transfer function with only real poles unless the openloop damping factor is greater than .71, but your system should be stiffer than that.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.