Close

Actuation & Control Schemes Hack Chat Transcript

A event log for Actuation & Control Schemes for Robotics

In this chat, we'll be learning about control schemes for robotics

Stephen TranovichStephen Tranovich 04/27/2018 at 20:150 Comments

Stephen Tranovich

12:06 PM

Okay, let's get started! A HUGE welcome to Ryan Walker @MachineHum for joining us today. Can you start out  by telling us a bit about yourself?

Stephen Tranovich

12:06 PM

Then we'll jump into the community questions!

TegwynTwmffat☠

12:06 PM

In our case with @jonokemphughes we're identifying plants

Stephen Tranovich

12:06 PM

Everyone, add your questions here! https://hackaday.io/event/151725-actuation-control-schemes-for-robotics

Machinehum (Ryan Walker)

12:06 PM

Sure sounds good, guess I jumped the gun :-P

Morning.Starjoined  the room.

12:06 PM

Morning.Star

12:07 PM

Hey guys :-)

Stephen Tranovich

12:07 PM

I like the eagerness :)

TegwynTwmffat☠

12:07 PM

No gun jumped :)

Shayna

12:08 PM

heya

Stephen Tranovich

12:08 PM

hiya Shayna!

Machinehum (Ryan Walker)

12:09 PM

My name is Ryan Walker, people IRL know me as simply 'Walker' and people on the internet know me by 'Machinehum'. My main focus over the past 6 years has been mainly in electronics. Lots of embedded compute (shout out to STM32), PCB design, robotics, control schemes and general hacking.

bejecreimer

12:11 PM

Is there audio chat room available for this discussion?

Machinehum (Ryan Walker)

12:12 PM

For a living right now I work for a product design company that focuses on R&D. My past work has included industrial automation where I've designed control schemes for multi-ton moving saws used in the lumber industry, industrial control lines and PLC programming.

Stephen Tranovich

12:12 PM

Hey @bejecreimer, nope this is a text only chat

TegwynTwmffat☠

12:13 PM

would you use a plc to control a robot?

Machinehum (Ryan Walker)

12:13 PM

Previous to that I worked in prosthetics, designing and building machines that are currently being used to machine fake legs :-P

Stephen Tranovich

12:15 PM

Nice! Machinehum is such a good handle. From massive saws to fake legs, those are some epic projects too!

Stephen Tranovich

12:15 PM

let's jump into some questions, shall we?

TegwynTwmffat☠

12:15 PM

yo

Stephen Tranovich

12:15 PM

first one is from @ðeshipu : How can you transform the data from the force/power sensors in the joints into useful events, such as touching the ground, hitting an obstacle or being pushed? I have tried various hard-coded and custom-filtered approaches, but I can't help but wonder if there is some way of pattern-matching this kind of data? Some kind of regular expressions for time series?

Machinehum (Ryan Walker)

12:15 PM

Lets do it

Audi McAvoy

12:17 PM

Wow. Diving in deep!

TegwynTwmffat☠

12:18 PM

I'm trying very hard to understand the question

Machinehum (Ryan Walker)

12:18 PM

Hey @ðeshipu good question, the lame answer is: it depends on the application. Have you looked into 'state space control' this is a popular control method that uses various intermediate state control variables instead of standard causal control

Machinehum (Ryan Walker)

12:18 PM

Let me give an example

Frank Leon Rose

12:18 PM

(I love the concept of regexp for non-character steams.)

Chuck Glasser

12:19 PM

Please address possible solutions for systems that have many motors and sensors. In my case I've no less than 11 steppers, several servos, two lasers, three cameras, multiple gas solenoids, blowers, fans, etc. For controllers there's EMC2, tinyg, multiple grbl's, wireless sensors and actuators.  Chilipeppr looks to be the best solution at present. Do you have any other recommendations?

Stephen Tranovich

12:19 PM

Heha I normally start soft, but there are some good hard hitting questions I'd hate to miss already posted. Let's go all the way with this one!

Stephen Tranovich

12:20 PM

@Chuck Glasser Add your questions in the comments here: https://hackaday.io/event/151725-actuation-control-schemes-for-robotics

ðeshipu

12:20 PM

Sorry for a hard question.

Stephen Tranovich

12:21 PM

Thanks for the hard question!

Machinehum (Ryan Walker)

12:21 PM

If I'm controlling a motor, for simplicity lets say brushed-DC. When you input a voltage the motor spins, using conventional control you can relate the input Voltage(t) to the output Velocity(t), more voltage, more velocity. A more complex system may have intermediate 'things' effecting the velocity. It's possible to build these into the model.

TegwynTwmffat☠

12:21 PM

what are the force / power sensors?

Mike Andersonjoined  the room.

12:21 PM

ðeshipu

12:23 PM

@TegwynTwmffat☠ sensors that tell you how much power a motor is taking, or what forces are acting on a joint

Machinehum (Ryan Walker)

12:23 PM

So @ðeshipu in you system it's possible that you might be able to build other actuators into the main control loop, depending on their effect on the main actuator.

ðeshipu

12:24 PM

@MachineHum the idea was to use only the motor's power to do a primitive proprioception

ðeshipu

12:24 PM

and that roughly works, but it's hard to deduce particular events from it

bejecreimer

12:24 PM

@ðeshipu, Have you looked into implementing a correlation filter with a threshold?  I am assuming you want to differentiate a soft touch versus an impact.

ðeshipu

12:25 PM

so I can do something like a complaint arm, but not easily guess things like hitting an obstacle

Mike Anderson

12:25 PM

I've used motor controllers that have closed loop controls that you can get current usage over the CAN bus.  Great for detecting stall current.

ðeshipu

12:25 PM

@bejecreimer I would like to be able to recognize various events based on the patterns they generate

Stephen Tranovich

12:26 PM

Thanks for working with the hardball first, @MachineHum. And feel free to talk about it more after the chat, or if you have something to add now.

Stephen Tranovich

12:26 PM

The next question is slightly lighter while keeping it specific from @Roger : Standard RC servo will move to and hold a commanded position. Is there an alternative (and ideally inexpensive) actuator that can hold a commanded level of force? Usage scenario: Hexapod robots using cheap servos are common, and they walk well on level ground. What if we want to walk on uneven ground - each [not servo] needs to exert enough force to hold a percentage of the robot's weight before it takes the next step. But the distance required to reach that amount of force varies when walking on uneven ground.

bejecreimer

12:27 PM

@ðeshipu https://goo.gl/jrDBDu

I think the best way to approach this is a signal processing standpoint

Jesse

12:27 PM

@ðeshipu

Look into an SVM. you'd have to record these events and be able to 'fit' the SVM to the event. Then you're looking at a sliding window from t-x to t and seeing if you light up with a match

Jesse

12:28 PM

@ðeshipu,

Once i learned how they work, that was one of the first uses that came to mind. I have yet to try it though.  I intended to use it to identify the point of impact for an electro-mechanical actuator. I would imagine this would work best if you were at a controlled speed

Jesse

12:29 PM

The medium i was going to impact was compliant. If it was non-compliant, it was quite simple. Current goes high, position stops changing

TegwynTwmffat☠

12:29 PM

I've got a similar problem with vehicle driving over uneven ground.

ðeshipu

12:29 PM

@Jesse thanks, I will do that. I was thinking about the HTMs, but they seem very complex

TegwynTwmffat☠

12:30 PM

It goes over a rock and positioning error goes thru the roof

Jesse

12:30 PM

@ðeshipu,

HTM's?

TegwynTwmffat☠

12:31 PM

planning to use current sensors to balance torques after the steering geometry calcs

Machinehum (Ryan Walker)

12:31 PM

@Roger: That's actually a really interesting question! I'm not aware of an OTS solution that does this, and I think I know why. By analysing the back EMF of the motor it's possible to infer the applied force, which would be the most obvious technique, I've done things like this before, the problem is, if you measure the voltage on the lead of the motor you get GOBS of noise when the motor is moving

ðeshipu

12:31 PM

@Jesse probably a huge overkill: https://en.wikipedia.org/wiki/Hierarchical_temporal_memory

Jesse

12:32 PM

@ðeshipu

Jesse

12:32 PM

@ðeshipu,

Jesse

12:33 PM

crap, sry.

@ðeshipu,

Yes. Too complex. SVM is lighter and easier. sk-learn has them

Machinehum (Ryan Walker)

12:33 PM

@Roger: The signal artefacts are typically generated from things like breaking the static friction, un-smooth movement and more then anything (if you're load is heavy enough) the gravity vector changing during movement.

Machinehum (Ryan Walker)

12:35 PM

A typically solution for this is to move to a certain point (in position control), watch for a known spike (in the force) then maintain that force.

Stephen Tranovich

12:35 PM

Huh, so cool

Stephen Tranovich

12:35 PM

Our next question is from @bejecreimer : Whats the best and cheapest way to get torque feedback for various electric actuators (servos, linear actuators, dc motors, steppers, etc)?

Machinehum (Ryan Walker)

12:38 PM

Lets start with motors

Machinehum (Ryan Walker)

12:38 PM

Cheapest: BackEMF analysis, understanding the relative position of the shaft and current flow through the armature you can infer the torque.

Machinehum (Ryan Walker)

12:40 PM

I believe this will actually work for linear actuators as well.

Mike Anderson

12:40 PM

How about a PID loop using a quadrature shaft encoder for position and reading the current from the motor?

Jesse

12:40 PM

I second that. DC motors are quite well modeled and many reputable motor manufactures can provide the values you need to estimate this with a surprising level of accuracy

TegwynTwmffat☠

12:41 PM

so what if you're not using a reputable manufacturer?

Machinehum (Ryan Walker)

12:41 PM

Hey @Mike Anderson: Sorry, I should have explained a bit better, what you described is what I was talking about :)

Mike Anderson

12:42 PM

We do this kind of thing a lot in FRC when we're trying to climb something and then hang.

ðeshipu

12:42 PM

@TegwynTwmffat☠ then you model it yourself

Machinehum (Ryan Walker)

12:43 PM

@TegwynTwmffat☠ : Good question, I wonder if there are any open initiatives to modelling those?

TegwynTwmffat☠

12:43 PM

@ðeshipu .... how?

Machinehum (Ryan Walker)

12:43 PM

Applying a known load and measuring the response

TegwynTwmffat☠

12:44 PM

what response?

Jesse

12:44 PM

How quickly it accelerates to steady state, What the current draw is, etc

TegwynTwmffat☠

12:45 PM

@jesse thanks!

Jesse

12:45 PM

This was from a breif google search but i recognize most of the formulas

http://www.modularcircuits.com/blog/articles/bridge-to-the-far-side/motor-modeling/

Jesse

12:45 PM

been a while since i did this work

Morning.Star

12:45 PM

If you want cheap there's always

https://www.peratech.com/what-is-qtc.html

This stuff is impressive for direct pressure to voltage sensing. Its in lift doors to gamepads. ;-)

Machinehum (Ryan Walker)

12:45 PM

Lets say you have a motor with an encoder, you can do something like hang a known mass off the rotor, you can apply a step input of various DC voltages and watch accelerating, velocity, etc...

Machinehum (Ryan Walker)

12:46 PM

Thanks for the link :)

Stephen Tranovich

12:46 PM

Depending on how much you like doing science experiments, it can be worth it to pay the extra money for a part that comes with a data sheet.

Mike Anderson

12:47 PM

I think you can use a strain gauge as a transducer to measure torque, can't you?  I've seen them attached to rotating shafts to do that if you don't have a torque cell on the system.

TegwynTwmffat☠

12:47 PM

a torque cell?

Stephen Tranovich

12:47 PM

The next question is mine! Hooray! What is good to keep in mind when designing modular components with the intention to have them used in larger applications with unknown control systems?

TegwynTwmffat☠

12:48 PM

must google that!

Jesse

12:48 PM

@Mike Anderson

You can but the telemetry is usually quite expensive. If you have the know how to rig up some tx/rx, try it

Jesse

12:48 PM

If you have deep pockets for that sort of thing, get HBM. market leaders

Mike Anderson

12:50 PM

For completeness, here's something for measuring torque on a rotating shaft.  https://measurementsensors.honeywell.com/techresources/appnotes/Pages/Ways_to_Measure_the_Force_Acting_on_a_Rotating_Shaft.aspx

Machinehum (Ryan Walker)

12:51 PM

@Stephen Tranovich: Thanks for the question, this is goody. IMO the most important thing is completely open documentation, source and hardware. Without all this it's hard for the designer to understand exactly how to integrate the part into the system, and is it doesn't fit, you should be able to mod it so it does!

Stephen Tranovich

12:51 PM

We have 10 minutes left in the Hack Chat, so let's get our last questions in!

Mike Anderson

12:51 PM

What sort of components?  Sensors, motors, uPs or something else?  I think that size, weight and power needs to be taken into account in all cases.

Stephen Tranovich

12:51 PM

Post them here: https://hackaday.io/event/151725-actuation-control-schemes-for-robotics

Mike Anderson

12:53 PM

So, I'd do modularity in a completely different way if I was designing a sumo bot (really tiny) versus a self-driving car.  So, I'd think you'd have to design modules based on the application space and SWaP.

Stephen Tranovich

12:54 PM

Building with future modding in mind would also be super helpful, and documenting how to easily mod as well.

Machinehum (Ryan Walker)

12:54 PM

More specifically, I think understanding standard and most commonly used 'stuff' is really important. Things like: typically people use M3 holes on their PCBs... unless there's a really good reason not to. Standard frame size motors, the NEMA class sizes are really awesome and offer great re usability for these parts

Stephen Tranovich

12:55 PM

So sticking to best practices

Machinehum (Ryan Walker)

12:55 PM

In the future I want to see more 'defecto' standards put in place by makers, you don't need a huge company with a big stamp to make rules. Just a really good reason for the rule to exist.

Machinehum (Ryan Walker)

12:56 PM

@Stephen Tranovich: Totally :D

Mike Anderson

12:56 PM

But, that being said, you could design generic modules like 9-DoF sensor systems that would work in a lot of applications.  You'd need to have an idea of the interfaces though. I2C, SPI, PWM and UARTs are good in most small to mid-sized applications.  Then stick to NEMA standards so you could fit them in the right places.

Stephen Tranovich

12:56 PM

But that requires a bunch of hackers to be on the same page...

Stephen Tranovich

12:56 PM

Lest question is from previous Hackaday Prize judge @Elecia White : What books or resources do you recommend for people wanting to do more robotics, to learn about the algorithms like localization, noisy sensors, control, kinematics, and so on. Do you have any that take more of an applied perspective instead of a graduate-level, derive-everything book? (I'm currently reading Probabilistic Robotics and it is ok but getting from "derive Kalman Filter" to "use it in my robot" is a big chasm.)

Jesse

12:57 PM

Take a Udacity nano degree. Worth every penny

ðeshipu

12:58 PM

Personally I can really recommend this course: https://www.edx.org/course/underactuated-robotics-mitx-6-832x-0

ðeshipu

12:58 PM

it's math-heavy, but clears a lot of ideas

Mike Anderson

12:58 PM

I'd look at all of the materials that are available dealing with the FIRST Robotics Competition.  Lot's of good, easy to digest info on sites like http://chiefdelphi.com.

Mike Anderson

12:59 PM

Kalman filters, PID loops, etc. with spreadsheets and small software tools to help understand what's going on.

TegwynTwmffat☠

1:00 PM

@Mike Anderson  ... thanks!

Elecia White

1:00 PM

@Jesse, thanks, I've done most of the Udacity classes relating to robotics, I agree they are useful. @Mike Anderson: ooh! Neat! And @ðeshipu: oooh! Also neat!

Mike Anderson

1:01 PM

I've got a lot of basic stuff presentations I did for Embedded Linux Conference, etc. out on YouTube.  They hit the highlights of how to build robots.

Machinehum (Ryan Walker)

1:01 PM

@Elecia White: I can't actually think of anything off the top of my head specifically about robotics, the Art of Electronics and the open All About Circuits text are awesome Electronics refs. Most of my learnings have been from dissecting ROS packages lol.

Elecia White

1:01 PM

I *really* like books. :) But I'll go take a look.

Stephen Tranovich

1:02 PM

And with that we're past 1PM and the Hack Chat is officially over. Let's give our thanks to @MachineHum for getting into some of the nitty gritty of actuation with us from the get-go. Thanks, Walker!

Discussions