# Tag Info

77

For small, low torque motors with little or no gearing, one procedure you can use to get a good baseline tune is to probe it's response to a disturbance. To tune a PID use the following steps: Set all gains to zero. Increase the P gain until the response to a disturbance is steady oscillation. Increase the D gain until the the oscillations go away (i.e. ...

29

I'm posting this as an answer because it is the answer. You can't. As @BendingUnit22 mentions, you are attempting "open loop" control. Noise and variations will mean that your robot will never drive a perfectly straight line. The motors could have different winding resistances (different drive currents/torque), the wheels could be different sizes, the ...

16

The simplest controller is a linear state feedback controller. There are essentially 4 different states that you need a gain for. These are tilt angle, tilt rate, speed and position. LQR (linear quadratic regulator) is a method to design these gains (after obtaining a linearized state-space representation of your system). If you do not have a state space ...

16

The main purpose of the integral term is to eliminate the steady state error. In the normal case there is going to be a small steady state error and the integral is mainly used to eliminate this error. It's however true that when the error gets to 0 the integral will still be positive and will make you overshoot. Then after overshoot the integral will start ...

15

A similar experimental method to hauptmech's answer that I was taught in college: Set all gains to 0. Increase Kd until the system oscillates. Reduce Kd by a factor of 2-4. Set Kp to about 1% of Kd. Increase Kp until oscillations start. Decrease Kp by a factor of 2-4. Set Ki to about 1% of Kp. Increase Ki until oscillations start. Decrease Ki by a factor of ...

15

Very short answer: 2 Sensors Regarding whether reading from sensors all in one node or each separately, you should ask yourself this question: Are the sensors meaningless without the other? This question asks if the sensors are tightly coupled or not. For example, say you have a sensor that is sensitive to temperature (and you need to compensate for it). ...

15

Torque is analogous to force for rotating systems, in that: $$F = m a \\ \tau = I \alpha \\$$ Where $\alpha$ is angular acceleration and $I$ is moment of inertia. $m$ and $a$ are mass and linear acceleration, respectively. So, in a way, a position controller, a velocity controller, and an acceleration (torque) controller are all different ...

14

I'm going to take a slightly different tack to Chuck. What is Torque Control? For me, Torque Control is about performing a move with an explicitly defined torque, rather considering torque just the means to the end of Position or Velocity control. Normally when you move a robot, you specify position and speed, with the robot allowed to use any and all ...

13

What you're asking isn't going to be very easy with a standard RC servo. What you're asking for is a back-drivable servo. I.E. one which you can freely rotate by applying an external torque. It is certainly possible to create these, and they are used on many robots, but most RC servos require considerable torque to back drive them. I would call them semi-...

11

The glaring issue I see at the moment is that you are forcing polarity on the I and D terms. In general, you are using a lot of sign checks, sign assignments, and conditional programming. None of that belongs in a PID controller. The entire controller should look like: pError = Input - Output; iError = iError + pError*dt; dError = (pError - previousError);...

10

A co-worker and I once implemented a simplex algorithm for on-the-fly tuning of the PID parameters of a current control loop for a motor. Essentially the algorithm would modify one parameter at a time and then collect data on some feedback parameter that was our measure of goodness. Ours was percent deviation from a current target setpoint. Based on whether ...

10

Typically, a coordinate frame is placed at the robot center. The x-axis points forward, the y-axis points left, and the z-axis points up. Then, we measure angles with respect to the x-axis. So, a 90 degree angle would mean along the y-axis, as shown, So, "12" corresponds to 0 yaw, or straight forward. "9" corresponds to 90 degree yaw, or along the y-axis....

10

You're trying to find a formula to convert a given $(r, \theta)$ to left and right thrust percentages, where $r$ represents your throttle percentage. The naive implementation is to base your function on 100% throttle: At $0 ^{\circ}$, left and right thrust are equal to $r$ At $\pm45 ^{\circ}$, one side's thrust equals $r$ and the other side's equals 0 At $\... 10 In the simple models and block diagrams of control systems you will find in basic textbooks, they will show you a single diagram with a feedback section which uses measurements of the target parameter and a feedforward section which does not use the target paremeter. Be ready to relax that definition when you get to the real world. Treat it as terminology ... 10 The barometer carried on the pixhawk has an altitude resolution of 10 cm. If that isn't enough, you could write a kalman filter that uses the accelerometer data in the prediction step and the ultrasonic sensor and/or the barometer in the correction step. But I don't see this solving your problem. An accurate measurement of altitude at 20hz should be plenty ... 9 I believe the most popular solution to this problem is an LQR controller. The problem you are trying to solve is the inverted pendulum problem. Using those keywords, you should be able to Google someone's open-source code. The next problem will be mapping most of the relevant physics quantities to your application (weight, motor torque, etc...) 9 Building CNC equipment may teach you: Motor control Kinematics and coordinated movement How to choose motors for a given load Mechanical movement (torque, moment, etc) Simple electronics Running CNC equipment may teach you: Software control of hardware Timing (at least on the gross level) Feedback Hardware error detection and recovery While the fields ... 9 If you're only using proportional force, then at some point it will be balanced by the force of gravity -- your error will converge on that balance, not zero. To compensate for the mass of the arm, you'll need to add an integral force term. This will increase over time to counterbalance the constant force of gravity. See also: this answer on the integral ... 9 The paper Controlling of Quadrotor UAV Using a Fuzzy System for Tuning the PID Gains in Hovering Mode by E. Abbasi, M. J. Mahjoob explains how to tune PID gains with fuzzy logic. You can find many papers about singleton tuning but this paper shows totally fuzzy control find PID gains with ziegler-nichols (or another technique) Create a fuzzy PID gain ... 9 It's called compliance. Gravity compensation by itself is not enough to achieve this, as well it is not mandatory. For example, if reducers with high reduction ratios are used, robot arm will be very stiff to move around. One way to make robotic arm compliant is to have torque sensors that can measure the differences in expected load (i.e. weight of the arm)... 9 Typically with a multiple input, multiple output (MIMO) system, a control engineer uses a state feedback controller. This style of controller leverages a state-space model of the system and generally takes the form: $$\dot{x}=\mbox{A}x+\mbox{B}u \\ y = \mbox{C}x + \mbox{D}u \\$$ where$x$is a vector of states,$u$is a vector of inputs,$y$is a vector ... 9 First I would question your math that got you to the 12b sensor. If you have a$dy$of 1 mm over an arm that is$r = 1$m long, then$\sin(\theta) = dy/r \rightarrow \theta = \mbox{asin}(dy/r)$. If you make the small angle approximation$\sin{\theta} \approx \theta$, then$\theta \approx dy/r$. This is$\theta$in radians, so you're looking at a full ... 8 The function$T(\mathbf{x})$that describes how ones input to a system maps to the output of the system is referred to as a transfer function. For linear systems the transfer function can be written as$N(\mathbf{x})/D(\mathbf{x})$where$N$and$D$are polynomials, i.e. $$T(\mathbf{x}) = {N(\mathbf{x})\over D(\mathbf{x})}$$ The zeros of the system are the ... 8 As you probably guessed from the lack of answers, subsumption architecture is not an active area of research any more. Most papers on this have been published in the late 80's / early 90's. This doesn't mean that subsumption architecture is dead; it has been very influential in robotics, and it's still used in education for example, but it is just not a hot ... 8 Embedded.com has moved my article yet again, but here is where it is now. This shows you both how to write a PID loop (figuring out how to do it in something other than floating point is left as an exercise to the reader) and how to tune it. PID Without a PhD The best way depends a lot on your abilities. The way to get the best tuning, assuming you're an ... 8 A PID controller would be the best, Using a compass then it is a relatively straight forward task of getting the bearing of your robot and comparing it to the bearing you want to achieve, and using some PID tuning techniques to achieve a smooth turning motion to your desired heading. This approach can also be applied to rotating by a given amount accurately. ... 8 Imagine that you set up a PID controller on your own arm, so that you could hold a cup of coffee straight out in front of you. The proportional element would control your arm strength relative to your hand position being too high or too low. The derivative element would adjust that strength based on how quickly you were already moving, so that you don't ... 8 I think you've taken a good first step; you've divided the problem into a mobile platform (which has uncertainty of position and must navigate) and the arm (which has a fair certainty of position in real time, through encoders). I have looked at papers related to robots architecture [...] but I have yet to find information on how to have the low level ... 8 Disclaimer: I have never done this myself, but only have seen a description of it being done through Georgia Tech's "Control of Mobile Robotics" on Coursera. My knowledge of controls is spotty, too. Thus... take this with a grain of salt. :) To keep the robot upright (and still), you're trying to stabilize (send to$0$) the state$x$, where:$\$x=\left[\...

Only top voted, non community-wiki answers of a minimum length are eligible