From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9505 Closed Loop Position Control Example

Hello, I have a cRIO 9073 with a NI 9505 module that I'd like to use for simple position control of a unit along a lead screw.

I don't have the softmotion module, and am trying to write a program bassed off of the "Position Control (closed loop) - NI 9505" example to control the position the small motor attached to the lead screw (Faulhaber 2342S024CR with a 512 count/rev encoder that we had laying around)

 

I've reviewed the manual PID tuning example, and have not had much luck getting the response that I'd like when making large position moves simply by adjusting Kp,Ki,Kd gains of the position loop, as the overshoot remains too high for this application when making large moves.  The system is also oscillating about the set point, and doesn't ever seem to dampen out unless I change things other parameters on the fly such as the current limit, or current loop parameters (osciallations get worse as current limit is increased).

 

Can someone advise me if the components of this example are up to this task?  Or on the interactions between the current limit, current loop parameters, and position loop parameters from this example, and which parameters would have the most impact on achieving desirable system performance?

 

Is there a VI available that can autotune such a motor?

0 Kudos
Message 1 of 3
(6,446 Views)

Hello - there are many reasons why a closed loop controller can oscillate - from correct settings of controller (kp,ki,kd) to making sure signals act in the appropriate direction to deadband/friction in the actuator to badly sized signals/actuators.

 

Firstly, have a look at the signal your controller is outputing (ideally in LabVIEW so you can graph it). Does it oscillate - perhaps as a sawtooth, a sinewave or simply switching between maximum and minmum values. I presume the electrical motor driving the screw which is driven from some AO signal from the cRIO (could also be a PWM signal driving the motor).

 

I expect (from what you say about current limit) the control signal will be oscillating by switching between maximum and minimum (e.g. +10V to -10V) or oscillating like a sinewave. What values of kp, ki, kd are you using ? If kd is non-zero, set it to zero (you only need worry about this if you want to get maximum performance). Is ki non-zero ? Try setting it to zero - any better ? If you are still getting big oscillations in your control signal, keep reducing kp (e.g. half each time?) until oscillations disappear (as you reduce kp, control signal *should* get smaller - maybe not straight way though).

 

If this does not make oscillations go away, then it may be that you have a sign wrong in your loop - i.e. a positive control signal makes lead screw move in opposite direction controller expects. This should be a fundamental thing sorted out when setting up the loop - you could do an open test to check which way +ve voltage moves lead screw. If you find it moves in opposite direction - you can either re-wire, or put a "-1" gain on controller output.

 

If there is any more subtle oscillations / obersvations, then try to show some plots of the lead screw motion and control signal, as that always helps when trying to diagnose what is going wrong.

 

Good luck.

 

 

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 2 of 3
(6,439 Views)

Hello - I was wondering if you still had the Closed Loop Position Control example for the NI 9505 module? I have looked for this VI to utilize it for motor control but cannot find it anywhere.

0 Kudos
Message 3 of 3
(2,431 Views)