Closed loop mode with Radio RC

5 years 3 months ago #29530387 by Goncharenko
I'd like to use the Closed Loop mode with my radio remote control.
Is it possible? How the code will looks like?
I use now:
SetCommand(_GO, 1, L_Motor)
but I need to get the constant RPM.

Please Log in or Create an account to join the conversation.

5 years 3 months ago #29530389 by TechSupport
You set up your configuration or your script to configure the motor to be in a closed loop mode. You will also need a feedback device to make this work. Either an encoder (digital or incremental) for speed. Then you fine tune your PID as well as your speed and acceleration parameters.

Please Log in or Create an account to join the conversation.

5 years 3 months ago #29530400 by Goncharenko
I put the controller into closed loop:
setconfig(_MMOD, 1, 1)
I used the step motor, so I have an internal hall sensor as a feedback sensor
And than - I send:
SetCommand(_GO, 1, Power)
to the motor.
At high "Power" the movement is pretty smooth, but if power is less than 20% of maximum the
feedback error becomes high and motor starts "jumping".

What is wrong?

Please Log in or Create an account to join the conversation.

5 years 3 months ago #29530401 by TechSupport
Sounds like possibly a PID tuning issue.

In your closed loop parameters, set the following.

P = 0
I = 2
D = 0

Loop error detection: disabled

Add more I gain as needed until speed reached is close as possible without oscillation.
Add small D gain to add boost in change of speed command.
Add small P gain(decimal value (example 0.3) as needed to reach speed.

The power will be used according to where the speed is and where it needs to be. Therefore it is not always going to go to 100%.
The following user(s) said Thank You: Goncharenko

Please Log in or Create an account to join the conversation.

5 years 3 months ago - 5 years 3 months ago #29530402 by Goncharenko
could you give me the reference to the user manual?
I can't find how to tune PID in MicroBasic....

Thanks!

PS: I've tuned the PID by RoboteQ software - it works! The low-speed movement is much more smooth now.

Please Log in or Create an account to join the conversation.

5 years 3 months ago #29530407 by TechSupport
Okay. If you need to reference it, it can be found on page 216. Since it is a configuration value you would use setconfig(_KP, cc, nn) where cc = motor channel and nn = value. KP is the proportional gain.

Please Log in or Create an account to join the conversation.

5 years 3 months ago - 5 years 3 months ago #29530463 by mmiles19
Would you mind providing a link to this tuning software? I don't remember hearing anything about RoboteQ having their own software..

Please Log in or Create an account to join the conversation.

5 years 3 months ago #29530464 by TechSupport

Please Log in or Create an account to join the conversation.

5 years 3 months ago #29530465 by mmiles19

TechSupport wrote: Roborun Plus

dev.roboteq.com/dev1/index.php/support/downloads


I have Roborun+. I must be confused. I understand you can set the PID gains in Roborun+ but I thought Goncharenko meant there was a RoboteQ program to determine your PID gains for you. Is there any better way to do this other than trial-by-error?

Please Log in or Create an account to join the conversation.

5 years 3 months ago #29530466 by TechSupport
Unfortunately not. Naturally, the motors when bench set up won't work exactly the same as when connected to the load when fully assembled. Many usually bench test first before putting into their fully assembled application and then further fine tuning as needed. We don't currently have something that would fine tune this as there are other factors that go into tuning.

Other parameters that can have an effect on the PID tuning are the speed and acceleration. Also the type of closed loop mode has various other factors depending on the mode itself.
The following user(s) said Thank You: mmiles19

Please Log in or Create an account to join the conversation.

Time to create page: 0.130 seconds