Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

tuning controller for DC motor with springs

Can someone advise me on tuning my controller?  I have the 7358 DAC output driving a DC servo motor through an audio amplifier.  The motor has springs holding its position at zero.  The current in the coil acts against the springs.  In order to dwell on the target position, I need a DC current through the coil, produced by a non-zero DC output from the DAC.  I think this situation is confusing Auto Tune.  I've been playing with manual tuning, but I keep getting an oscillating step response.  It seems the controller thinks the DAC output should go to zero when the target position is reached.  That causes my motor to spring back to the origin position, and the cycle resumes.
 
Josh Moses
 
0 Kudos
Message 1 of 11
(5,303 Views)
You will want to add a torque offset to that axis.  This link shows how to do that in MAX.
0 Kudos
Message 2 of 11
(5,298 Views)

Dear Brian,

I am using NI-Motion 7.2.  I added a torque offset per your suggestion, but I could not tell that that had any effect on the step response or the DAC output.  I am still having trouble.  I even removed the springs from my motor, since I thought they were the cause of my problem.  But the system is still not tracking.  Two examples of the problem are attached.  I'm pretty stuck here.

Josh

 

Download All
0 Kudos
Message 3 of 11
(5,280 Views)
You should be able to measure the DAC output to see if the offset is there.  What kind of drive are you using?
0 Kudos
Message 4 of 11
(5,273 Views)

That's what I expected, but I have a scope connected to the DAC, with DC coupling, and I see no offset.  The drive is an audio amplifier, into a DC motor.  Very simple.

0 Kudos
Message 5 of 11
(5,270 Views)
If you reset the board and look at the offset value in MAX, is it still there?  Once we get that established, I think it is just a matter of tuning.
0 Kudos
Message 6 of 11
(5,265 Views)

Yes, after resetting the board, the DAC torque offset is still there in MAX, but not on my o'scope.

Josh

0 Kudos
Message 7 of 11
(5,259 Views)
Oh, wait a second.  I think I may have a cable connection problem.  I assumed my cables were OK, since I was getting a signal, but now that I wiggle them....  I'll let you know if replacing my cables fixes the problem.
 
Josh
 
0 Kudos
Message 8 of 11
(5,258 Views)

Ah!  My amplifier is AC coupled!  All this time I've been thinking it responded at DC, but it doesn't.  Oops, that would explain the trouble I've been having!  Thanks for you effort!

 

Josh

 

0 Kudos
Message 9 of 11
(5,254 Views)
I am doing better now.  I removed the springs from the motor, and I got a DC coupled amplifier.  I tried applying a square wave voltage source to the amplifier, and got a triangle wave position signal in MAX, as expected.  I can make a move through MAX, and it reaches the target destination.  This is all very good.  My next challenge is to get a move with a flat constant velocity in the middle.  Here is a plot that shows the velocity of what was intended to be two constant-velocity moves, one forward and one back.  I don't know why the velocity is so wavy.  I'd appreciate any advice on flattening the velocity profile.
 
Josh
0 Kudos
Message 10 of 11
(5,229 Views)