- Hardware & Machines
- Driver Boards
- OUTPUT_SCALE and PID tuning Mesa 7i93 plus 2@ 7i40 H bridge drivers
OUTPUT_SCALE and PID tuning Mesa 7i93 plus 2@ 7i40 H bridge drivers
- shasse
- Offline
- Premium Member
Less
More
- Posts: 96
- Thank you received: 55
29 Dec 2019 05:27 #153410
by shasse
OUTPUT_SCALE and PID tuning Mesa 7i93 plus 2@ 7i40 H bridge drivers was created by shasse
I am currently working on a 3-axis servo gantry and am at the point of tuning the axes. The hardware and wiring all seems to be properly integrated. I am wondering how to determine an appropriate value for the OUTPUT_SCALE and then how to approach PID tuning those drivers. I am currently using the default pncconf OUTPUT_SCALE of 10, and the machine seems "soft" for lack of a better description. We are running 48VDC through the high voltage version of the 7i40s.
For PID tuning, my understanding is that for a simple H Bridge system I am tuning a torque mode control system. For that I believe I should set a faster servo thread (perhaps 250,000 ns period), and then I may need P, D, and FF1 terms. Is that correct?
Thanks for the advice!
Scott
For PID tuning, my understanding is that for a simple H Bridge system I am tuning a torque mode control system. For that I believe I should set a faster servo thread (perhaps 250,000 ns period), and then I may need P, D, and FF1 terms. Is that correct?
Thanks for the advice!
Scott
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17869
- Thank you received: 4776
29 Dec 2019 14:35 - 29 Dec 2019 14:38 #153435
by PCW
Replied by PCW on topic OUTPUT_SCALE and PID tuning Mesa 7i93 plus 2@ 7i40 H bridge drivers
Bare H-bridge drives running PM DC motors behave somewhat like velocity mode servos
(with quite low velocity feedback gain) So they end up being somewhere between velocity
and torque mode.
That is, you are setting the average motor drive voltage with the PWM value. This sets the
approximate motor velocity because the motor will accelerate to a velocity where the generated
back EMF is close to the supplied voltage. If the motor impedance was zero, you would have close
to a perfect velocity mode servo, but the impedance is substantial which leads to the low
inherent feedback gain.
Normally for Hbridges, I would start with a low P value and tune the D term as high as
possible without excessive buzzyness, then set FF1 so that the actual position does
not lead or lag the commanded position at full speed, then I would tune FF2 so that
the actual position does not lead or lag the commanded position during acceleration
Then I would tune P as high as possible without oscillation, overshoot and then when
everything else is close, add as much I term as possible without instability.
Also if possible post you hal/ini files in case there are some basic setup issues.
(with quite low velocity feedback gain) So they end up being somewhere between velocity
and torque mode.
That is, you are setting the average motor drive voltage with the PWM value. This sets the
approximate motor velocity because the motor will accelerate to a velocity where the generated
back EMF is close to the supplied voltage. If the motor impedance was zero, you would have close
to a perfect velocity mode servo, but the impedance is substantial which leads to the low
inherent feedback gain.
Normally for Hbridges, I would start with a low P value and tune the D term as high as
possible without excessive buzzyness, then set FF1 so that the actual position does
not lead or lag the commanded position at full speed, then I would tune FF2 so that
the actual position does not lead or lag the commanded position during acceleration
Then I would tune P as high as possible without oscillation, overshoot and then when
everything else is close, add as much I term as possible without instability.
Also if possible post you hal/ini files in case there are some basic setup issues.
Last edit: 29 Dec 2019 14:38 by PCW. Reason: format a bit
Please Log in or Create an account to join the conversation.
- shasse
- Offline
- Premium Member
Less
More
- Posts: 96
- Thank you received: 55
03 Jan 2020 17:39 #153910
by shasse
Replied by shasse on topic OUTPUT_SCALE and PID tuning Mesa 7i93 plus 2@ 7i40 H bridge drivers
Thanks for the advice, I was out of town for a week and just got back to this. I had two main issues, the first was the 7i40 drivers were in the low current mode and were hitting current limiting during normal operation. This was a major issue, and changing those jumpers resolved it. The second issues was that I had the PWM base frequency at 20kHz, and 50kHz was recommended. I am not sure if that made a significant differences, but it was recommended by the pncconf sanity check and some other docs.
You can see the full machine configuration at
github.com/Sector67/router-conversion/tree/master/config
with some currently disjoint notes in the wiki of that repo. It is possible there are other issues, but the machine seems basically workable now.
Thanks!
Scott
You can see the full machine configuration at
github.com/Sector67/router-conversion/tree/master/config
with some currently disjoint notes in the wiki of that repo. It is possible there are other issues, but the machine seems basically workable now.
Thanks!
Scott
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
- Hardware & Machines
- Driver Boards
- OUTPUT_SCALE and PID tuning Mesa 7i93 plus 2@ 7i40 H bridge drivers
Time to create page: 0.061 seconds