Implementing Feedforward Position Component on NI-Motion Controllers
Primary Software: Driver Software>>NI-Motion/FlexMotion
Primary Software Version: 8.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: Motion Control>>Controllers>>PCI-7340, Motion Control>>Controllers>>PCI-7350, Motion Control>>Controllers>>PXI-7340, Motion Control>>Controllers>>PXI-7350
Problem: How can I implement a feedforward position component to my system if I know that my load will vary linearly as I move away from the zero position?
Solution: This type of feedforward could be designed using
NI-SoftMotion, but is not natively supported by PCI NI-Motion controllers. In order to implement position feedforward on an axis of an NI-Motion controller, you will need to use 2 axes. They should be setup in the following manner:
- Axis 2 will behave as normal. It will be wired up normally with encoder feedback coming in and analog output going out. It will be blind to the feedforward component of the system and will act as a normal PID controller.
- Axis 1 will take care of the feedforward voltage to add to the system. It will not have any inputs and will be blind to position. It will only output a voltage based on the commanded position.
Whenever a position is commanded, Axis 1 and Axis 2 will need to be setup to both receive the position command. This could be done using a vector space. The axes will respond in the following manner:
- Axis 2 will use a PID loop to get to the appropriate position based on the encoder feedback it receives.
- Axis 1 will see a commanded position and then alter its voltage based on a P gain to a voltage that it thinks will help it reach that set point. Because Axis 1 does not have any feedback, it only knows the commanded position and that it is not there. The following settings will need to be made on Axis 1:
- Trajectory Settings – Set following error to 0. This will eliminate following error so that Axis 1 will continue to output a voltage even if it never starts getting closer to its set point.
- Acceleration, Velocity, Jerk, Deceleration – Set as high as possible. This will enable the Axis to output a constant voltage for the velocity feedforward rather than a ramp up and ramp down voltage. Any change will be almost instantaneous.
- Control Loop - In control loop settings, set Kp so that it outputs a voltage appropriate to the voltage feedback you need. I’m not sure whether you have an equation that could find this pretty quickly or if you would need to find it empirically. Also, set Kd and Ki to 0 so that Axis 1 only acts to add a proportional gain to the system.
Next, sum the voltages from Axis 1 and Axis 2 using an external op amp. Be sure to set everything up so that you will not exceed the +-10V range of most drives.
Related Links:
Attachments:
Report Date: 03/29/2007
Last Updated: 08/31/2007
Document ID: 47SEC3P9