# Tag Info

4

What would be the benefits of implementing this full nested control architecture for the control compared to my current implementation Textbooks are always a great source of information! Reference: "Feedback Systems - An Introduction for Scientists and Engineers", Karl Johan Astrom, Richard M. Murray. Could a simple if condition on a specific ...

3

I came back to this question and thought a bit more about it because of your bounty - typically the bounties are offered from a point of desperation, and I hate that feeling myself. I think probably your code is fine, in looking at it. There are things that I'd do differently, like scaling your PID output by the time step, but you could distribute that ...

3

The position coordinates x, y, z are inadequate information to compute the roll pitch and yaw. x, y, and z are the position of the vehicle in space. roll, pitch, and yaw are the attitude or orientation. They can change independently. Aka you can change the orientation of the vehicle independently from the position of the vehicle.

2

The answer is not a trivial one. Because, the system dynamics depends on multiple sub-system dynamics (including software, sensors, and actuators (motors in this case)) finding the optimum value for t_loop, requires finding the best possible controller for all (i.e. several) t_loop values. It's worth considering the following approach: assume that the ...

2

The approach is the right beginning. The term for it is dead reckoning. It has some problems regarding its precision. Next steps in increasing precision would be sensor adding optical flow or other sources for distance travelled some using sensor fusion technique. You do not have a redundancy problem. If you use the same sensor signal and transform it into ...

2

This looks like a common angle wrapping mistake. I am assuming you're defining your angles between -180° ($-\pi$) to +180° ($\pi$). Let's say your current heading is -170°. And you desired heading is 170°. The error in angle is: 170 - (-170) = 340, so your robot has to do almost a full turn to get to the desired heading. Since you're defining your angle in ...

2

Backlash is only an issue when you change directions, because that's when you'll open the space in the gear train. If you're using PID control, consider an overdamped response instead of a typical "critically damped" response that overshoots. An overdamped response should have no overshoot and thus no directional change. You'll have a slower ...

2

Based on the suggestion “look into PID”l controller” I did some more research on that for line following and that’s exactly what I was looking for. Funny in some ways my naive algorithm already uses a P factor to adjust the error. The I and D will help smooth out the amount of overshoot when I hit the center and minimize the “S turns” to stabilize. Will need ...

2

I think you've got a conceptual issue here with your PID setup. You mention both: a PID controller that takes as input the current distance between the second robot and the first one and using the error, e(t) provided by the PID A PID controller accepts an error as an input and tries to drive that error to zero. If you are providing an absolute position ...

1

The control of a pendulum subject to gravity is a quite standard control problem to which you may apply different techniques such as PID or LQR. Unless you perform current control, you usually don't have direct access to the torque $\tau_m$ generated by the motor. A more common setting foresees voltage control instead. In this context, the dynamic equation ...

1

To improve sampling time, you can usually avoid the full $180^o$ sweep, resorting to it only when the bot has no idea of where the light is. Otherwise the world has continuity you can use: the light is probably near where it was the last time you located it, and it's probably about as bright as it was then. So you can probably make a pretty good guess where ...

1

You cannot simply neglect the weight. The total thrust $T$ is normally provided by a combination of a feed-forward term $T_{FF}$ and a feedback term $T_{FB}$: $$T = T_{FF} + T_{FB}.$$ Ideally, the feed-forward contribution should be designed such that it delivers the effort required to drive the plant toward the target: $$T_{FF} = mg + m\ddot{z_d}.$$ If ...

1

Let me preface this by saying I've never done quadcopter controls before. With a vehicle, the gas pedal doesn't control speed or position, it controls torque. For a quadcopter, the equivalent would be the horizontal forces. The roll/pitch angles would be an input to the horizontal force, but thrust is also an input and the relationship is nonlinear: \$F_{...

1

There's a lot going on here, and the issues aren't very clear to me. I would suggest trying to tackle your problems one at a time, and to not move on until you are confident the root issues are sorted out. For example, you have trouble with your PID output, but you also have issues with your angle estimates. You'll never fix the PID controller until you get ...

1

It should be perfectly fine to control the boat with two thrusters (i.e. propellers with some distance in between them), via a PID control scheme. To compensate for ambiguities in the model and the real world (e.g. streams, wind, thruster inequalities, etc) integral terms are required, but I didn't include them in the following answer. :) Your definition of ...

1

Given that you are using 2 dc motors, I'm guessing you are using a differential drive configuration. Your intuition about the algorithm is good. The encoders on the motors along with some physical/mechanical measurements (wheel radius/circumference and wheel base) are used as input to a kinematic model, in this case the unicycle model. Using this, you can ...

1

It is not possible to calculate your roll - pitch - yaw angles from linear position information. If you are using a simulated robot with sensors, you can use the gyroscope readings from the IMU sensor, that way you are going to have the angular velocities in three axes. You can then integrate this readings to get angular position. However, because of the ...

1

If I'm interpreting your description correctly (the two sensors are measuring the distance to the wall in a direction roughly perpendicular to the direction of travel and the two sensors are displaced so that one is more "forward" in the direction of travel) , you need to change the angle of the robot relative to the wall in order to change the ...

1

I believe what you observe with the integral part is windup. You might fix that by limiting the overall value of the I part, or resetting it once the error is small or zeroes out or changes sign (zero crossing). All are known approaches dealing with windup (basically the integral keeps collecting until it saturates and then the system becomes unstable). Gil

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