04/27/2018 at 20:15 •
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?
Then we'll jump into the community questions!
In our case with @jonokemphughes we're identifying plants
Everyone, add your questions here! https://hackaday.io/event/151725-actuation-control-schemes-for-robotics
Sure sounds good, guess I jumped the gun :-P
Morning.Star joined the room.
Hey guys :-)
I like the eagerness :)
No gun jumped :)
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.
Is there audio chat room available for this discussion?
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.
Hey @bejecreimer, nope this is a text only chat
would you use a plc to control a robot?
Previous to that I worked in prosthetics, designing and building machines that are currently being used to machine fake legs :-P
Nice! Machinehum is such a good handle. From massive saws to fake legs, those are some epic projects too!
let's jump into some questions, shall we?
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?
Lets do it
Wow. Diving in deep!
I'm trying very hard to understand the question
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
Let me give an example
(I love the concept of regexp for non-character steams.)
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?
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!
@Chuck Glasser Add your questions in the comments here: https://hackaday.io/event/151725-actuation-control-schemes-for-robotics
Sorry for a hard question.
Thanks for the hard question!
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.
what are the force / power sensors?
Mike Anderson joined the room.
@TegwynTwmffat☠ sensors that tell you how much power a motor is taking, or what forces are acting on a joint
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.
@MachineHum the idea was to use only the motor's power to do a primitive proprioception
and that roughly works, but it's hard to deduce particular events from it
@ð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.
so I can do something like a complaint arm, but not easily guess things like hitting an obstacle
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.
@bejecreimer I would like to be able to recognize various events based on the patterns they generate
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.
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.
I think the best way to approach this is a signal processing standpoint
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
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
The medium i was going to impact was compliant. If it was non-compliant, it was quite simple. Current goes high, position stops changing
I've got a similar problem with vehicle driving over uneven ground.
@Jesse thanks, I will do that. I was thinking about the HTMs, but they seem very complex
It goes over a rock and positioning error goes thru the roof
planning to use current sensors to balance torques after the steering geometry calcs
@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
@Jesse probably a huge overkill: https://en.wikipedia.org/wiki/Hierarchical_temporal_memory
Yes. Too complex. SVM is lighter and easier. sk-learn has them
@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.
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.
Huh, so cool
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)?
Lets start with motors
Cheapest: BackEMF analysis, understanding the relative position of the shaft and current flow through the armature you can infer the torque.
I believe this will actually work for linear actuators as well.
How about a PID loop using a quadrature shaft encoder for position and reading the current from the motor?
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
so what if you're not using a reputable manufacturer?
Hey @Mike Anderson: Sorry, I should have explained a bit better, what you described is what I was talking about :)
We do this kind of thing a lot in FRC when we're trying to climb something and then hang.
@TegwynTwmffat☠ then you model it yourself
@TegwynTwmffat☠ : Good question, I wonder if there are any open initiatives to modelling those?
@ðeshipu .... how?
Applying a known load and measuring the response
How quickly it accelerates to steady state, What the current draw is, etc
This was from a breif google search but i recognize most of the formulas
been a while since i did this work
If you want cheap there's always
This stuff is impressive for direct pressure to voltage sensing. Its in lift doors to gamepads. ;-)
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...
Thanks for the link :)
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.
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.
a torque cell?
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?
must google that!
You can but the telemetry is usually quite expensive. If you have the know how to rig up some tx/rx, try it
If you have deep pockets for that sort of thing, get HBM. market leaders
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
@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!
We have 10 minutes left in the Hack Chat, so let's get our last questions in!
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.
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.
Building with future modding in mind would also be super helpful, and documenting how to easily mod as well.
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
So sticking to best practices
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.
@Stephen Tranovich: Totally :D
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.
But that requires a bunch of hackers to be on the same page...
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.)
Take a Udacity nano degree. Worth every penny
Personally I can really recommend this course: https://www.edx.org/course/underactuated-robotics-mitx-6-832x-0
it's math-heavy, but clears a lot of ideas
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.
Kalman filters, PID loops, etc. with spreadsheets and small software tools to help understand what's going on.
@Mike Anderson ... thanks!
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.
@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.
I *really* like books. :) But I'll go take a look.
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!