Skip to main content
17-Peridot
December 11, 2018
Solved

Feedback and torque control

  • December 11, 2018
  • 1 reply
  • 7677 views

Hello everybody,
I would try to implement a PID control over a simple crank connecting rod.
The system starts from standstill and has to reach a normal velocity of 3 rev/sec. The motor has a normal torque of 8,5 Nm and there is a force of 50 N along the "piston" axis.

I set the analysis as described in the attached PDF; the only difference is that in the example the motor has to fix the bar, so the final position is a fixed value and its velocity is zero. In my case the maotor continues to rotate; the desired velocity is the nominal one of 1080 deg/s and the desired position is (nominal_velocity * T).

I have two problems:

  1. I don't know the right value for the PID's constants.
    I tried to run an optimization analysis to minimize the velocity error (intended like the absolute value of error) but I can't insert it like the goal.
  2. I would limit the torque (in my mind the motor is a brushless) inside its operational field delimited by a max value for torque and velocity.

Any suggestions are welcome!

PS: I used Creo 5 for making the example.

 

Thanks
Bye

Best answer by SweetPeasHub

Attached is a working speed control.

I added a quadratic drag damping to be more realistic, otherwise the energy to maintain speed is exactly zero.

Note the parameter MAX_TORQUE cannot control the "Specify Domain" of the motor so the domain must be updated manually (you can enter MAX_TORQUE and it will copy the value,but not link it)

 

If your intention was to control the second order effects, the motor is way under-specified and the analysis name CONSTANT will generate the torques required to keep the speed absolutely constant. (Larger than 100Nm)

Therefore the RMS speed was what is being controlled by the PID in my example.

I suggest a flywheel to limit the second order variation, but then it will take much longer to ramp up to speed as it is already maxing out the motor. That is what saturated means, something is maxed out, like the motor or the amplifiers.

 

I had lots of trouble using gain on the D part, crashing CREO, etc.  maybe someone else can give insight on that, but based on the error I think it was just maxing out the size of matrix allowed in the solver.  Or maybe I was not doing this quite right.

1 reply

17-Peridot
December 13, 2018

Hello,

For position control  PID would mean P = position, I = integral(position), D = speed.

For speed control PID would mean P = speed, I = position, D = acceleration.

It should be straight forward to change the variables/measures to match speed control based on the position control example.

 

 

also see this for some ideas on how one might go about tuning the gains.

I think you could use a function to limit the torque by the motor capability before tuning the PID. 

psuedocode  torqueToMotor= minimum(PID torque, max motor torque)

Or while tuning the PID gains you could watch the max torque and stop increasing gains when this is approached or at some % of the max that you want to target.

 

17-Peridot
December 14, 2018

Attached is a working speed control.

I added a quadratic drag damping to be more realistic, otherwise the energy to maintain speed is exactly zero.

Note the parameter MAX_TORQUE cannot control the "Specify Domain" of the motor so the domain must be updated manually (you can enter MAX_TORQUE and it will copy the value,but not link it)

 

If your intention was to control the second order effects, the motor is way under-specified and the analysis name CONSTANT will generate the torques required to keep the speed absolutely constant. (Larger than 100Nm)

Therefore the RMS speed was what is being controlled by the PID in my example.

I suggest a flywheel to limit the second order variation, but then it will take much longer to ramp up to speed as it is already maxing out the motor. That is what saturated means, something is maxed out, like the motor or the amplifiers.

 

I had lots of trouble using gain on the D part, crashing CREO, etc.  maybe someone else can give insight on that, but based on the error I think it was just maxing out the size of matrix allowed in the solver.  Or maybe I was not doing this quite right.

gfraulini17-PeridotAuthor
17-Peridot
December 17, 2018

I'm studying your great work (!) for which I thank you.
I also don't understand why simulation fails with whatever Kd value...reducing timestep or Kd very very small don't work.

In addiction I don't understand why you said "I added a quadratic drag damping to be more realistic, otherwise the energy to maintain speed is exactly zero" when we have the 50N force which pushes on the slider.

 

Now I want to do some tries...I don't know if it's better controlling the system in Velocity or Position.