How to control 2 motors' speed to keep balance with simulink PID controller?

6 次查看(过去 30 天)
Hi,
I am trying to build a balance beam system with DC motors and fans on both ends. I use potentiometer as sensor, connect to pin A3, and use PID control to balance the beam, but when the balance position is reached, the motor will stop operating without receiving new error feedback, but what I want is for the motor to continue to operate in this balanced state. This is my simulink diagram.(kp=3.4,ki=1.5,kd=0.5,filter coefficient=160)
Does anyone know how to improve it?Extremely grateful!
  1 个评论
Mathieu NOE
Mathieu NOE 2021-3-17
hello
so the potentiometer acts as a rotary position sensor ?
this is how I see the solution : the two motors should be driven in 2 decoupled degrees of freedom
there should be only one PID loop for the "torque" control (the output of this PID is driven in parallel the two motors but one output has polarity reversed.
the second degree of freedom is "traction" that is the two motors are driven also together but with same polarity
this one does not need a PID loop as we don't have a sensor for this degree of freedom. We simply use a constant value that keeps both motors to spin at a fixed RPM - even when the first loop has reached zero error (balanced)
these two control loops simply adds their outputs for each motor
simple hand made graphic below

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 PID Controller Tuning 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by