# Questions tagged [pid]

Proportional Integral Derivative Controller. A type of control algorithm used in many control situations, especially servo systems.

371 questions
Filter by
Sorted by
Tagged with
330k views

### What are good strategies for tuning PID loops?

Tuning controller gains can be difficult, what general strategies work well to get a stable system that converges to the right solution?
• 1,307
21k views

### How can I use the Arduino PID library to drive a robot in a straight line?

I would like to create an Arduino based robot with 2 wheels, quadrature encoders on each wheel, a H-bridge driver chip (or motor controller) and a caster. I want to use the PID library to ensure the ...
• 361
5k views

### How can I automatically adjust PID parameters on the fly?

I have a simple servo system that uses a PID controller implemented in an MCU to perform the feedback. However, the properties of the system change dynamically, and so the PID parameters can never be ...
• 6,457
13k views

### I don't understand Integral part of PID controller

I dont understand integral part of PID controller. Let's assume this pseudocode from Wikipedia: ...
• 251
19k views

In continuation of the question I asked here: Quadcopter instability with simple takeoff in autonomous mode ...I'd like to ask a few questions about implementing a basic PID for a quadrotor ...
• 419
6k views

### How is PIV control performed?

I'm considering experimenting with PIV control instead of PID control. Contrary to PID, PIV control has very little explanation on the internet and literature. There is almost a single source of ...
• 390
11k views

### Approach to using PID to get a differential robot driving straight

Consider a differential drive robot that has two motorized wheels with an encoder attached to each for feedback. Supposed there is a function for each DC motor that takes a float from -1 to 1 and sets ...
• 2,142
11k views

### In PID control, what do the poles and zeros represent?

Whenever I read a text about control (e.g. PID control) it often mentions 'poles' and 'zeros'. What do they mean by that? What physical state does a pole or a zero describe?
• 6,457
8k views

### Why does a ID controller not exist?

Why doesn't a PID only consisting of ID exist?
• 345
19k views

### Control both Velocity and Position (Linear actuator)

I am trying to control the velocity + position of a linear actuator. At this moment I am able to control the position or the velocity. But I'm trying to control both. What the control has to do: Let ...
• 101
11k views

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

I'm making a quadcopter. I have set up a PID loop to stabilize it to a given Euler angle (pitch and roll). The problem arises when the roll approaches 90 degrees (45 degrees and up). The values don't ...
415 views

### What is the actual physical actuated quantity when controlling the position of a servo?

I'm trying to learn about servo control. I have seen that the most generic position control method for servos is PID, where the control input is position error. However, I am not sure about what is ...
• 390
7k views

### Line Follower optimization

I'm working on building a line follower robot and want to optimize its performance. It was suggested that I use a PID algorithm. I read a lot about PID but am confused a bit regarding following: I've ...
• 221
4k views

### How can we use the accelerometer for altitude estimation?

I am currently implementing an autonomous quadcopter which I recently got flying and which was stable, but is unable to correct itself in the presence of significant external disturbances. I assume ...
3k views

### Multiple control loops with overlapping effects

I'm familiar with using PID to perform closed loop control when there is a single output and a single error signal for how well the output is achieving the desired set-point. Suppose, however, there ...
• 193
4k views

### How to know the desired orientation of a quadcopter?

I am trying to simulate a quadcopter model on Simulink. I want to implement a PID controller for each of X,Y,Z and phi,theta, psi angles. PID gets the error, as input, which is to be minimized. For ...
6k views

I'm trying to implement a PID control on my quadcopter using the Tiva C series microcontroller but I have trouble making the PID stabilize the system. While I was testing the PID, I noticed slow or ...
1k views

### understanding the PID controller

I am trying to understand the effects of P, I and D constants in a PID controller on a system. As far I've understood, P and I make the system 'faster', and D makes it 'slower'(which I read in books),...
• 345
3k views

### How to tune the PID parameters using Fuzzy Logic?

I previously used the Ziegler method to tune the parameters of my PID controller to control my robot's position. I then implemented fuzzy logic for self-tuning the parameters. I have two inputs to ...
130 views

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

I'm trying to control a plane via roll using PID controller , I had a problem finding the transfer function thus I used the following method :- Fix the plane in an air tunnel change the ...
• 169
8k views

### Position Controller for a Quadrotor

I have a question regarding the implementation of a quadrotor's position controller. In my Matlab model the quadrotor takes 4 inputs: a desired altitude ($Z_{des}$) and desired attitude angles(\$\Phi_{...
• 690
833 views

### Can I use Ziegler-Nichols's rules to find PID parameters for a non linear system

I'm trying to use a PID to stabilize a system described from the following difference equation: $$y_{k+1} = a y_k \sqrt{(1-y_k)}~~~ + b y_{k-1} ~+ c u_k$$ Can I use Ziegler-Nichols's rules to find ...
• 173
4k views

### Cascading PID DC Motor Position & Velocity Controllers

I'm trying to build a robot with a differential drive powered by two DC Motors. First I implemented a PID Controller to control the velocity of each motor independently. Estimated the TF using the ...
• 173
2k views

### Differential drive trajectory following control

I have a robot platform with differential drive which knows it's position and orientation. Lets say that the space through which the robot moves is known and it has only static obstacles. The task is ...
• 850
7k views

### PID with position and velocity goal?

I'm trying to design a control system for a robot that tracks moving object. Thus I want to robot to match the position and velocity state of the object. I don't want robot to simply to arrive at the ...
• 61
8k views

### PID output does not reach setpoint precisely enough

I'm developing/tuning a software PID for a quadcopter. For now I'm only trying to stabilise the pitch angle using the front and back motors, and I'm only looking at Kp. The motors have a control ...
• 478
190 views

### Are there any problems with a variable frequency PID?

I am working on a quadrotor and am trying to solve the problems described here. In attempts to bring the refresh rate to 100 Hz, I did an analysis of the functions and most of the time 35+ ms is ...
• 360
5k views

### How frequently should a PID controller update?

I am developing a quadcopter platform on which will be extended over the next year. The project can be found on Github. Currently, we are using an Arduino Uno R3 as the flight management module. At ...
• 360
835 views

We are using ArduIMU (V3) as our Quadrotor's inertial measurement unit. (we have a separate board to control all motors, not with ArduIMU itself). As mentioned here , the output rate of this module ...
517 views

### Handling PID DC motor control at low speeds

I am building a 4 wheel rover and am using PID DC motor control for the back set of wheels. The feedback for the speed is provided by Hall effect sensors, with two pulses per rotation. This means ...
• 91
5k views

### Quadcopter PID Control: Is it possible to stabilize a quadcopter considering only angle measurements?

Good day, I am a student currently working on an autonomous quadcopter project, specifically the stabilization part as of now. I am using a tuned propeller system and I also already considered the ...
740 views

### PID Integration over not constant dt (∆time)

Is integration over not constant dt (∆time) a possible thing? Let's say you have a PID loop with differentiating frequency, can the integral part of it still work? (Assuming you know the dt from the ...
• 203
249 views

### Field oriented control of brushless motors

If I was controlling a normal brushed motor as a servo, I would measure the motor's position, and adjust the PWM signal to control the voltage. This way I could achieve a precise velocity/position ...
• 6,457
2k views

### PID control of tank-like robot and IMU

Consider a tank like robot with a motor driver channel for each side of the robot (two motors on the left and two motors on the right) and an IMU. I'm interested in driving the robot in a straight ...
4k views

### Multivariable PID controller

I'm making a robot that uses two DC motors to move, and has two distance sensors on its right side. I want to make a PID controller to control the angle of the robot (using a wall as reference) and ...
• 76
71k views

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

Question: A PID controller has three parameters Kp, Ki and Kd which could affect the output performance. A differential driving robot is controlled by a PID controller. The heading information is ...
• 51
1k views

### PID control: zero out integral on error sign change?

I am learning about PID as a novice to robotics (background in software engineering). One common problem with PID is that if the PV is below the SP for a long time, integral term will accumulate a ...
• 153
2k views

### Natural frequency computation (for PID gains computations)

I am currently trying to parametrize the low-level gains of a robotic arm. This arm uses a classical PID for each joint. I am trying to use a method based on computation rather than a trial-and-error/...
• 609
3k views

### The aerial refueling problem: sketch of a feedback controller

At first happy new 2015!!! I'm looking for my next simulator development: a Tanker is flying at constant speed (350 Knots) (no acceleration, no change of altitude or direction). The Tanker is ...
• 690
810 views

### Controlling a system with PID that resists backdrive

I'm controlling the angular position of a pendulum using a DC motor with a worm gearbox. Mechanically, worm gears are impossible to backdrive. Using a PID controller on a pendulum system with a ...
• 151
365 views

### PID Conundrums for Legged Robots

I am currently working on a legged hexapod which moves around using a tripod gait. I have two sets of code to control the tripod. Set 1: Time based control In this code set, I set the tripod motor ...
• 589
2k views

### Balance Bot PID tuning

so I am working on a Self Balancing Bot with Arduino Mega. I'm using 12V 200 RPM motors with built in 840 PPR quadrature encoders. The torque rating is as follows: Rated Torque: 2.4 Kg-cm Stall ...
782 views

### Self balancing bike using a flywheel: ROS implementation

I have a bike with two stands and a flywheel like this: The stands can be adjusted so that they don't touch the ground. Now, the task is to implement a self balancing mechanism: when I run the script,...
• 131
8k views

### differential drive PID controller

I have a differential drive robot that works fine (good PD parameters) driving at say 1 m/s. Now, if it speeds up (to 1.2 m/s) it starts wobbling again. What would be a good strategy for a controller ...
318 views

### Making a robot go in a straight rate - sampling rate for motor PID

I'm trying to build a robot/rover based on Raspberry Pi 3 At the moment I'm straggling with a basic driving in a straight line. I'm in a process of tuning my PID code andI'm not sure what sampling ...
• 173
2k views

### Tracking objects from camera; PID controlling; Parrot AR Drone 2

I am working on a project where I should perform object tracking using the camera of Parrot AR Drone 2.0. So the main idea is, a drone should be able to identify a specified colour and then follow it ...
• 185
1k views

### PID quaternion contoller

I want to control the attitude(roll, pitch, yaw) of a vehicle capable of pitching and rolling. To do this I have created a quaternion PID controller. First I take the current attitude of the vehicle ...
• 93
819 views

### Yaw angle calculation for drone PID from two distance sensors

I'm building a control system with a Parrot AR 2.0 drone where I have access to thrust controls for up/down (z), left/right (y), forward/backwards (x), turn left and turn right (yaw) through a Ruby ...
• 151