You are here

PID Speed Control not working in ADC mode

8 posts / 0 new
Last post
a.smith
Offline
Last seen: 3 months 5 days ago
VESC Free
Joined: 2019-11-13 05:37
Posts: 4
PID Speed Control not working in ADC mode

I'm trying to run a 4 pole inrunner with PID Speed Control using ADC input with a potentiometer. I have properly mapped the potentiometer voltage range. The problem is that the PID control sets the motor to maximum RPM at only 25% of potentiometer travel. The remaining 75% of travel shows up correctly in the ADC bar as the voltage rises, but the motor is steady at full RPM.

In PPM mode, there is a field for maximum PID ERPM. Is this feature missing with ADC mode?

skyline1970
Offline
Last seen: 4 months 2 weeks ago
VESC Free
Joined: 2017-09-07 22:28
Posts: 232

in app. settings, duty cycle mode should be selected, if current mode activated, motor reaches max rpm immediately.

a.smith
Offline
Last seen: 3 months 5 days ago
VESC Free
Joined: 2019-11-13 05:37
Posts: 4

I'm looking to do PID speed control, not duty cycle or current mode. The PPM app has an ERPM limit for PID, which works as expected. The PID controller will not allow the motor electrical RPM to exceed the value specified in the ERPM limit field. This field is missing from the ADC app.

skyline1970
Offline
Last seen: 4 months 2 weeks ago
VESC Free
Joined: 2017-09-07 22:28
Posts: 232

in app. settings, mapping, adc voltage mapping, adjust pid speed, min, max, etc..

a.smith
Offline
Last seen: 3 months 5 days ago
VESC Free
Joined: 2019-11-13 05:37
Posts: 4

That doesn't work. Have you tried PID speed control in ADC mode before? Even with the ADC voltage properly mapped, the motor speed is not mapped correctly to the ADC voltage range. There is NO pid rpm limit in ADC mode.

kianK
Offline
Last seen: 8 months 4 weeks ago
Joined: 2021-04-15 07:04
Posts: 4

Same problem here. Any solutions so far?

kylerlaird
Offline
Last seen: 12 months 3 days ago
VESC Original
Joined: 2020-12-29 16:28
Posts: 6

I came across this thread while working on a bike to test speed control.  I likely won't answer the original question adequately, but I thought it would be a good place to dump my experience.

Using ADC speed control requires setting up the ADC control (application) and configuring the motor.  Ensure that you update the correct place each time you change values.

Use of derivative (Kd) caused the motor to shake like crazy.  The filter did not help.  I need to revisit this.

I like using a lot of integral (Ki) with applications like this but I did not find any windup limit.  That caused huge overshoots. I initially landed on Kp = 0.03, Ki = 0.005, Kd = 0.00.

I limited the top speed using the Max ERPM settings (Motor Settings -> General -> RPM). They were +-1M and I set to 2500. Without that, it had behavior similar to what OP described; full throttle requested a high speed that was unattainable.  With a lot of Ki, the windup caused huge lag in decelerating.

I used a 3.0 second ramp up.  That reduced burnouts.  (This is a front hub motor.) I also set Minimum ERPM to 2.0 because without that it seemed to jerk the motor hard upon start.

I limited braking current to 20A. That made stops much more pleasant.

I've got a test track that goes down hill and then back up on grass.  It's remarkable that the direct drive motor can haul me up and down on a Dewalt battery (with 20" tires and no chain drive).

--kyler

lonelypanda
Offline
Last seen: 8 months 1 week ago
VESC Free
Joined: 2023-09-26 02:30
Posts: 1

sorry that i cant answer your question,but i have a question about PID controller as well, i really wandered when i finished setting the motor,setup the FOC and everything need to prepared,and when i set up the input ,i used the PPM mode,and the mapping of the PPM i used the PID control, when i used the remote controller,the motor worked normally,after that i chose the PID mode and then saved the choice,no mater how i used the remote controller,the motor still not responded ,that really disturb me , appreciate for anyone help!