Using Solo for a li...
 
Notifications
Clear all

[Solved] Using Solo for a linear actuator

Page 2 / 3
Forum 1
(@unolittlebird)
Trusted Member

@milad

here is a quick one. I will do more

1.) I set motor with 100 RPM to C.C.W. (which is extend)

2.) 100 RPM C.W. (Retract)

3.) 100 RPM extend

in all of them I pressed "motor stop" but it did not stop. It is always moving until its endpoint

 Capture
ReplyQuote
Topic starter Posted : 20/12/2021 2:17 pm
Forum 1
(@unolittlebird)
Trusted Member

here another one with the same behavior and results

 Capture
ReplyQuote
Topic starter Posted : 20/12/2021 2:19 pm
SOLO Team
(@milad)
Chief Member Moderator

Hi @unolittlebird,

It's clear that the current in the motor at zero speed has some offset ( around 0.5A) which means the current controller can not stabilize the torque ( or IM that contributes to Torque generation ) at Zero, the only reason for that can be the issue with the tuning of the current controller gains that are either very low or very high...

- However we can do a quick test in Open loop, so for that on Piano switch of SOLO UNO you need to put the PIN# 5 UP to go into open-loop, once there, you can give speed references from 0 to 100 ( standing for 0% to 100% duty cycle at the output) and see how the motor moves and if you are able to stop the motor once you send 0 as the speed reference.

- Regarding the issue with the current controller, can you try the following gains and see what happens?

current controller Kp = 4.0
current controller Ki = 0.0001

and switching frequencies of 30, 40, and 50kHz as well with the given gains, we are just increasing the Kp to make sure the controller of the torque reacts good enough to the differences, and with switchin frequency we are trying to see if it has any effect on the current fixations on the motor's stator.

Let me know the results please.

Milad

 

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.

ReplyQuote
Posted : 21/12/2021 8:48 am
Forum 1
(@unolittlebird)
Trusted Member

Hi @milad,

I tried today several of the yesterday mentioned parameters and noticed the results more clearly. In total 6 and for the last 4 I also added the monitor results. Maybe that helps. I could not upload more than one picture at the same time so I made a screenshot with all 4 of them open. If you can't see enough please let me know.

Piano Switch was always 1,2,4,5 down and I always controlled Digital and Speed (because the motor did not do anything when I tried Digital and Torque).

1)
Observer Gain 50
Current Kp 2,13
Current Ki 0,10
PWM 20 kHz
- At low speed 200rpm very rumbling at high speed 2000rpm less but still rumbling. I can stop in CCW direction (extracting) but not in CW (retracting) direction. 0.3A is drawn and when I stop it is 0.2A and the motor continues.
so the stop does something. With 0.2A (after stop) the motor runs smoother with less vibration.

2)
Observer Gain 50
Current Kp 2,13
Current Ki 0,10
PWM 10 kHz
- Rumbling in CCW is the same and again: stronger at 200rpm than 2000rpm. I noticed that CCW still 0.3A are drawn and I can stop. In CW (retracting) the current drawn is only 0.2A and stop does nothing anymore. I assume this is because there is basically no controlling anymore in CW which is why it is already at 0,2A drawn.

POWER RECYCLE

3)
Observer Gain 100
Current Kp 3,30
Current Ki 0,10
PWM 10 kHz
- Same behaviour as in 2) with one difference. In CW it was rumbling and when I press top the rumbling stopped but the motor continued retracting allthough without rumbling. The rumbling in CW was stronger at 200rpm than at 2000 rpm.

POWER RECYCLE

4)
Observer Gain 10
Current Kp 3,30
Current Ki 0,10
PWM 10 kHz
- CCW rumbling stronger at 200 than 2000 rpm but existent in both. This time However there was no difference in CW between 200 and 2000 rpm. Always smooth with the same speed and not reacting to my stop.

POWER RECYCLE
5)
Observer Gain 10
Current Kp 0.5
Current Ki 0,0001
PWM 10 kHz
- The motor behaved veeeery slow. It was also less current drawn in both directions (around 0.10A) and overall much less rumbling. In CCW it reacted to my stop button but very slow. I could see that the current drawn decreased after I pressed it from 0.12A downwards.
In CW direction again no reaction to my stop but it was in general now at about 0.11A and not 0.2 as at earlier runs

POWER RECYCLE
5)
Observer Gain 100
Current Kp 0.5
Current Ki 0,0001
PWM 10 kHz
- Again very slow and also when I started CCW with 2000 rpm it took the motor to accelerate. Started with 0.09A and then slowly up to 016A. Pressing stop led to decreasing it again. At 200Rpm the starting A was already at 0.13. In CW it did not matter whether it was 200 or 2000rpm it was in both cases
about 0.12A as in 5) and did not react to my stop. For some reason, the monitor did not monitor any speed.

And I will now try your latest suggestion.

 Capture
ReplyQuote
Topic starter Posted : 21/12/2021 9:14 am
SOLO Team
(@milad)
Chief Member Moderator

@unolittlebird , ok and great job. 

Yes, I'm also very interested to know the results in Open-loop mode as mentioned above.

I will be waiting for your next updates.

Milad

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.

ReplyQuote
Posted : 21/12/2021 9:27 am
Forum 1
(@unolittlebird)
Trusted Member

@milad

isn't the Open-loop only for 3-phase motors? If I change to Open-mood (My Piano Switches now 1,2,4 down 3,5 up) then The motor does not obey any commands I send from the motion terminal.

ReplyQuote
Topic starter Posted : 21/12/2021 9:41 am
SOLO Team
(@milad)
Chief Member Moderator

@unolittlebird,

Posted by: @unolittlebird

isn't the Open-loop only for 3-phase motors? I

No, it actually works for DC brushed motors too.

Regarding the previous point about open-loop, sorry I made a mistake, the values of speed can be from 0 to 30000 standing for 0 to 100% duty cycle ( you can try to give a value like 6000 which is around 20% duty cycle), the reason that it didn't move is probably due to very low percentage for the PWMs, please watch the following video from 6.35 and see how we test the DC brushed motor in open-loop mode:

https://youtu.be/b79c87YTwmw

Let me know the results please.

Milad

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.

ReplyQuote
Posted : 21/12/2021 10:13 am
Forum 1
(@unolittlebird)
Trusted Member

@milad

Ok I will do so and then share the result of open loop. In the meanwhile I did the other tests and here are the results:

Posted by: @milad

- Regarding the issue with the current controller, can you try the following gains and see what happens?

current controller Kp = 4.0
current controller Ki = 0.0001

and switching frequencies of 30, 40, and 50kHz as well with the given gains, we are just increasing the Kp to make sure the controller of the torque reacts good enough to the differences, and with switchin frequency we are trying to see if it has any effect on the current fixations on the motor's stator.

7)
Observer Gain 100
Current Kp 4
Current Ki 0,0001
PWM 10 kHz
- In CCW motor decreases after stop but that takes time. In CW no reaction to stop. In CW generally slower and lower A. During CW time it is increasing/accelerating.

8)
Observer Gain 100
Current Kp 4
Current Ki 0,0001
PWM 30 kHz
- Faster than 7) in all, meaning that it decelerates faster after pressing stop so that the motor actually comes to halt before reaching the endpoint in CCW. In CW after pressing stop
a current drop from 0.25A to 0.18 is visible but the motor doesnt stop. At low rpm more vibrations than at 7) i.e. with lower kHz

9)
Observer Gain 100
Current Kp 4
Current Ki 0,0001
PWM 40 kHz
- Overall same behaviour as in 8) allthough I noticed now that in CCW at low rpm the rumbling turns now more into a stop and go.

10)
Observer Gain 100
Current Kp 4
Current Ki 0,0001
PWM 50 kHz
- Nearly no visible difference to 9). One thing I noted is that after I tell the motor to move, there is a delay pf about 1-2 seconds until it actually moves. This was already the case in 9) and also 8) but not as big. My impression is that it increases with higher kHz

 

 Capture1
ReplyQuote
Topic starter Posted : 21/12/2021 10:15 am
Forum 1
(@unolittlebird)
Trusted Member

Hi @milad

I now did the Open-Loop test (with values from 0 to 30000 it worked)

I had to do it 2 times because the 1st time the motor did only react in CCW direction and not CW. So I then Powered SOLO off and on again and then it worked in both directions.

It worked very well. Immediately stopped when I entered 0 and was fast according to the % in duty cycle. Attached you can find a picture. The peaks 1-4 are in CCW direction and the remaining in CW

Also I am sorry but I never mentioned that even in its end position I see on the power supply that 0.3 A are drawn (by SOLO? by my actuator?)

regards,

Cajetan

 11 openloop
ReplyQuote
Topic starter Posted : 21/12/2021 10:30 am
SOLO Team
(@milad)
Chief Member Moderator

@unolittlebird ,

Ok so do you think the performance in open-loop is acceptable for your application?

As I saw, your motor has gear reduction, so the motor is somehow decoupled from the load, that's why maybe open or closed-loop can't show any significant difference, of course for direct-driver open-loop and close-loop are having very different behavior.

I will remain available.

Regards
Milad

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.

ReplyQuote
Posted : 21/12/2021 10:41 am
SOLO Team
(@milad)
Chief Member Moderator

@unolittlebird 

Posted by: @unolittlebird

Also I am sorry but I never mentioned that even in its end position I see on the power supply that 0.3 A are drawn (by SOLO? by my actuator?)

 

SOLO in general has an internal consumption for power up all the chips and modules, so I feel that 0.2A is somehow consumed by the electronics of SOLO rather than the Motor, but in any case, let me know if you have a counterargument for this.

Regards
Milad

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.

ReplyQuote
Posted : 21/12/2021 10:43 am
Forum 1
(@unolittlebird)
Trusted Member
Posted by: @milad

Ok so do you think the performance in open-loop is acceptable for your application?

Can I still read the current consumption of the motor in Open-Loop? If yes, than that is acceptable for my application.

Posted by: @milad

As I saw, your motor has gear reduction, so the motor is somehow decoupled from the load, that's why maybe open or closed-loop can't show any significant difference, of course for direct-driver open-loop and close-loop are having very different behavior.

Could you elaborate? I am not sure if I understand what you mean.

Posted by: @milad

SOLO in general has an internal consumption for power up all the chips and modules, so I feel that 0.2A is somehow consumed by the electronics of SOLO rather than the Motor, but in any case, let me know if you have a counterargument for this.

No that's fine.

ReplyQuote
Topic starter Posted : 21/12/2021 10:56 am
Forum 1
(@unolittlebird)
Trusted Member

Hi @milad

I am now in the process of commanding the actuator from Raspberry in the Terminal. I just took one of the Raspberry_pi examples of the github SoloPy and leave the piano switch 5 up so that I am in Open-Loop mode.

I can controll the actuator with the speed reference from 0-30000 as in the motion terminal and stop it. I am using the get_motor_current() function for reading the current, since from what I saw in the USB_UART manual, this is the function to read the current going into the DC motor.

However, the current I read is different from the current drawn I see on my actual power supply. The factor differs sometimes by 10, sometimes more. Any ideas what could cause this?

Kind regards,

unolittlebird

ReplyQuote
Topic starter Posted : 21/12/2021 1:58 pm
SOLO Team
(@milad)
Chief Member Moderator

Hi @unolittlebird,

Posted by: @unolittlebird

Can I still read the current consumption of the motor in Open-Loop? If yes, than that is acceptable for my application.

Yes, "IM" that is the current acting in torque generation in DC brushed motor that can be read from SOLO regardless of control type or mode, so you can do that.

Posted by: @unolittlebird

Could you elaborate? I am not sure if I understand what you mean.

sure, what I meant was more into mechanics of the system, as I saw your linear motor, seemed somehow having a Gear in between the motor and the load exertion part (movable part), this will result that the shaft of the motor staying decoupled from the load, as as you keep the decoupling higher ( higher gear ratio), the Motor will be under less direct stress by the load, so the open-loop performance could be acceptable.

Posted by: @unolittlebird

However, the current I read is different from the current drawn I see on my actual power supply. The factor differs sometimes by 10, sometimes more. Any ideas what could cause this?

This is actually normal, as the motor in the simplest form can be seen as an RL circuit, so practically you can only compare the power drained from the supply in a given time with the power floating into the circuit and delivered to the load on the Otherside ( neglecting the losses), so in simple language, it's totally possible that the current you drain from the supply is not equal to the current in the motor as the circuit on each side is fundamentally different, but always the power you drain will be equal to the power floating in the motor, so from that you can actually calculate the current inside of the motor ( neglecting the losses).

I will remain available.

Milad

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.

ReplyQuote
Posted : 21/12/2021 2:14 pm
Forum 1
(@unolittlebird)
Trusted Member

Hi @milad,

I hope you had nice holidays 🙂

Posted by: @milad

This is actually normal, as the motor in the simplest form can be seen as an RL circuit, so practically you can only compare the power drained from the supply in a given time with the power floating into the circuit and delivered to the load on the Otherside ( neglecting the losses), so in simple language, it's totally possible that the current you drain from the supply is not equal to the current in the motor as the circuit on each side is fundamentally different, but always the power you drain will be equal to the power floating in the motor, so from that you can actually calculate the current inside of the motor ( neglecting the losses).

regarding this advice, I wondered whether there is a simple function to read the power used in the SoloPy library? I could only find the get_power_reference() in the UART manual but it is written there that this only works for 3-phase motors. So am I right in the assumption that I would need an extra sensor?

thanks again for all the help

ReplyQuote
Topic starter Posted : 05/01/2022 2:19 pm
Page 2 / 3
Share: