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 ...
user avatar
  • 14.5k
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 ...
user avatar
  • 1,001
10 votes

understanding the PID controller

It sounds like you've missed the core concept of a PID, so let's start from scratch. In mathematical terms, a PID controller decides how much force to apply in order to move a system in 1-...
user avatar
  • 10.8k
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 ...
user avatar
  • 1,815
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 ...
user avatar
  • 1,084
9 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 ...
user avatar
  • 4,088
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 ...
user avatar
  • 14.5k
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; ...
user avatar
  • 14.5k
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 ...
user avatar
6 votes
Accepted

How to use quaternions to feed a PID quadcopter stabilization loop?

A quadcopter contains (among other things) two separate and independent algorithms: an attitude estimation algorithm, and a control algorithm. The attitude estimation algorithm computes information ...
user avatar
  • 478
6 votes
Accepted

Deducing single wing plane transfer function Aka Transfer function estimation through set of points

You're correct that measurement and modeling is the right way to go about this. For your PID to work properly, you need to be able to make a somewhat linear conversion of error (desired roll vs ...
user avatar
  • 10.8k
6 votes
Accepted

Position Controller for a Quadrotor

By far, the most common solution to this problem is to use 2 separate controllers. The inner loop controller is what you already have: it tracks angle and height commands. The outer loop controller ...
user avatar
  • 2,669
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, ...
user avatar
  • 14.5k
5 votes

How frequently should a PID controller update?

1) I would try find out how fast your ESCs can update and use that as the PID update rate. Your current rate is definitely too slow (need at least 50Hz for marginal performance). 2) Putting a ...
user avatar
  • 2,669
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 ...
user avatar
  • 1,357
5 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 ...
user avatar
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 ...
user avatar
  • 14.5k
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 ...
user avatar
  • 1,881
4 votes

Why does a ID controller not exist?

You almost never see ID controllers because they generally don't do anything useful. Here is what they can do: 1) The D part will respond to changes in the system. It will try to correct and move the ...
user avatar
  • 2,669
4 votes
Accepted

PID output does not reach setpoint precisely enough

Since posting the question I tried to tune the 3 PID parameters a lot but I never reached any acceptable result. I didn't try to modify the error curve as I suggested in the question, but I found an ...
user avatar
  • 478
4 votes
Accepted

Natural frequency computation (for PID gains computations)

For a rough calculation of natural frequency, you could create an bode plot. Starting at low frequencies, command a sin wave and measure the amplitude of the output motion (which will be a phase-...
user avatar
  • 2,669
4 votes
Accepted

The aerial refueling problem: sketch of a feedback controller

Both the solutions you proposed do suffer from unwanted interaction among the two PIDs. You're basically trying to assign two simultaneous goals - i.e. final relative position along with terminal non ...
user avatar
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 ...
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 ...
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 ...
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 ...
user avatar
  • 14.5k
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 ...
user avatar
  • 440
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 ...
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 ...
user avatar
  • 4,375
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 ...
user avatar
  • 71

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