LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Speed and position control of a system with absolute position sensor

Hello,

I have an electro-mechanical system composed of a DC motor, gear-worm to reduce rotation speed and absolute angular sensor.

The DC motor is commanded via PWM. The sensor gives an analog signal from 0 to 5 V (after the gear-worm) for an angular range, lets say, from 0 to 180º.

At the moment, I am controlling the system with the following code in FPGA:

SerP_0-1699942905192.png

SerP_1-1699942923379.png

Basically, it is a PID control of the position ("Recopia") based on a given reference (Setpoint). The PID output is then "transferred" to a PWM generator.

It works fine and the system goes to the specified position but at uncontrolled speed.

 

I woud like to implement a double control loop to also manage speed, as it is difficult to limit/control values with this setup.

 

Does anyone know how to do it?

Thanks a lot!

 

0 Kudos
Message 1 of 3
(445 Views)

Hi SetP,

 


@SerP wrote:

I woud like to implement a double control loop to also manage speed, as it is difficult to limit/control values with this setup.

 

Does anyone know how to do it?

Thanks a lot!


You can add a limiter after your PID function to limit the rate of change of the output value. And you can apply absolute limits to limit the max speed...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(376 Views)

Hello GerdW,

Thanks for your answer.

 

A limiter at the PID output will only limit PID output change rate but that value is not directly related with the system speed. Also, it may modify the PID response making it unsteady (while the limiter is acting, the integral component of the PID will increase the output, by the time the position is reached the system will probably overshoot due to this component, and so on).

About apply absolute limits to the output: this is the method I use (by setting PID H and L at output, but this also limits the motor power/torque thus, with a bigger load the motor wont be able to move it.

 

That is why I was looking for a way to control speed of the system taking into account the position feedback

0 Kudos
Message 3 of 3
(372 Views)