As of May 31, 2023, we have updated our Code of Conduct.

Hot answers tagged

11 votes
Accepted

Quadcopter PID Algorithm

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 ...
Chuck's user avatar
  • 15.9k
11 votes

How do the PID parameters (Kp, Ki, and Kd) affect the heading of a differential driving robot when they are increased individually?

Proportional term: this controls how quickly to turn the steering when the heading is not at the set value. A low P will lead to sluggish steering, reacting only slowly to set heading changes. It may ...
Andy's user avatar
  • 1,031
10 votes

Control both Velocity and Position (Linear actuator)

The first thing to realise is that this is not a control problem, this is a planning problem. If you conflate the two, you are making life much more complex than it needs to be. Solution - Motion ...
Mark Booth's user avatar
  • 4,213
10 votes
Accepted

How can we use the accelerometer for altitude estimation?

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 ...
holmeski's user avatar
  • 1,833
9 votes
Accepted

How to tune the PID parameters using Fuzzy Logic?

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 ...
acs's user avatar
  • 1,104
9 votes
Accepted

Multiple control loops with overlapping effects

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 ...
Chuck's user avatar
  • 15.9k
7 votes

Do I need to use separate function in PID algorithm to make the bot go LEFT or RIGHT?

No, but you do need to calculate the P/I/D terms correctly. You have: I = I + previous_I; followed by: previous_I = I; ...
Chuck's user avatar
  • 15.9k
7 votes
Accepted

PID control: zero out integral on error sign change?

Generally, in a well-tuned PID, most of the job is done by the P term, which is responsible for driving PV to SP. Then, D and I serve as corrections: the D term regulates the profile as of how we ...
Ugo Pattacini's user avatar
6 votes
Accepted

increase PID sampling rate on embedded system

Increasing the sample rate probably isn't going to buy you much if you can't do something useful. That is, if you don't update the control signal (e.g., motor current) at the same high sample rate, ...
Chuck's user avatar
  • 15.9k
6 votes

PID with position and velocity goal?

In the case of MIMO systems (Multi-Input, Multi-Ouput), my warm suggestion is to go with State Space Control, which will give you enough freedom to move the closed-loop poles and thus achieve your ...
Ugo Pattacini's user avatar
6 votes
Accepted

PID controller that targets a set rotation and a set velocity at that rotation?

Find here a similar question. A well-tuned position PID is most of the time capable of accomplishing the task of reaching a target with zero velocity. The central point here is that you shall provide ...
Ugo Pattacini's user avatar
5 votes
Accepted

Length and Width of a Line Following Robot

Actually, the caster wheel has ideally no effect on the kinematics of the vehicle. In reality there will be some resistance from the caster wheel that does impact the vehicle motion, but we can still ...
Brian Lynch's user avatar
  • 1,377
5 votes
Accepted

What's wrong in controlling Roll+Roll rate in a quad-copter instead of using 2 separate loops for each?

That only works when the desire roll angle is 0. What happens if you are trying to turn and have a desired roll angle of 1deg? Even changing your sum to match the angle error, $w_1 (\theta - \theta_d) ...
ryan0270's user avatar
  • 2,774
5 votes
Accepted

Meaning of a negative step response with quaternion

Welcome to Robotics, PaoloH! This is a fantastic question for Robotics - It has some Matlab/Simulink, some control theory, some spatial (quaternion) representations, etc. Robotics is the place to come ...
Chuck's user avatar
  • 15.9k
5 votes

Which controller (PI or PD) is generally more robust to noisy sensor measurements and why?

Proportional control amplifies equally across all frequencies. Integral action amplifies low frequencies more, and high frequencies less (in fact, its gain at DC is infinite, and at infinite frequency ...
TimWescott's user avatar
  • 1,891
4 votes

Comparing LQR and PID controllers for inverted pendulum problem

You are correct in claiming that both PID and LQR can be applied to the linearized form of the cart-pole problem. If you have a look at the answers to the related question Ugo linked to in the ...
Brandon J. DeHart's user avatar
4 votes
Accepted

How to tune PID for a Y(t) = k*X(t) system?

I had problems understanding the diagram and the question. It might be because you didn't explain every step to keep the question short or just because I use some terminology differently so I'd like ...
Bending Unit 22's user avatar
4 votes
Accepted

PID Control: Integral error does not converge to zero

I don't think this is related to integral windup at all. I noticed that the I-error does not converge to zero That's a good thing, because it means your integral term is not useless. The integral ...
Bending Unit 22's user avatar
4 votes
Accepted

Quadrocopter PID

Technically, you can do it either way, but consider the following scenario: You are flying with a heavy load, and there is a wind gust. Each rotor is operating at almost 100% capacity due to the heavy ...
Chuck's user avatar
  • 15.9k
4 votes

Fixed Wing UAV: Do inherently unstable systems desire to be stable for all cases when a closed loop control is implemented on them?

Not all fixed wing aircraft are inherently instable. That feature greatly depends on the center pressure and gravity center designed position. Passenger aircrafts are quite stable, and fight planes ...
galtor's user avatar
  • 470
4 votes

PID with position and velocity goal?

If in fact you need the robot to be at the same speed as the tracked object at the time it arrives with it, you might need to employ more sophisticated methods. However, a controller that is the ...
Bryan's user avatar
  • 41
4 votes

PID with position and velocity goal?

In many cases, a single traditional PID controller is adequate to track an object and match both position and velocity of the object. With the error term of the PID in terms of position, the integral ...
David Cary's user avatar
  • 4,435
4 votes

Balance Bot PID tuning

Just a hint from my extensive experience from self balancing robots: The most important aspect of a self balancing robot, is the actuator acceleration (torque) control. (...) the motors start ...
vmatos's user avatar
  • 71
4 votes

What is the best adaptive controller for robotic arms?

The given strategies can be divided into two groups: model-based and model-free control. The AMPC and MARC suggestions are model-based the other are model-free. Theoretically, a pid controller can be ...
Manuel Rodriguez's user avatar
4 votes
Accepted

Inverted pendulum controller

Without going into the details of the underlying equations of motion, I could argue that the D part is needed to damp out the oscillations of the pole while reaching for the (unstable) equilibrium ...
Ugo Pattacini's user avatar
4 votes

PID Control: Is adding a delay before the next loop a good idea?

Don't disengage your controller. The purpose of a controller is not only to steer your system to the desired setpoint according to a predetermined dynamical response but also to counteract potential ...
Ugo Pattacini's user avatar
4 votes

Inner current controller benefits

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: &...
Ugo Pattacini's user avatar
4 votes

Impact of using PID Output as a Change (Delta) vs Absolute

All PID controllers are relative in the sense that they act on a reference error, which is the difference between the reference signal and the sensed signal. Assuming the integral error starts at the ...
Chuck's user avatar
  • 15.9k
4 votes

Does PID controller work on every actuator

does the PID controller work on every actuator? The short answer to this is yes. PID controllers are used to stabilise a plant/system. They are heavily used in ...
WittyDimension's user avatar
3 votes
Accepted

My PID Controller in Java is not operating correctly

You have a few problems that I see. The biggest problem is that your values for P, I, and D and too aggressive. This is making the PID loop oscillate from hard stop to hard stop. You generally want ...
DrRoboto's user avatar
  • 181

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