# How to determine the components of a feedback control loop given following context?

Based on this feedback control loop

where $$w$$ is the desired setpoint, $$x$$ the process variable, $$e$$ the error value, $$y$$ the correcting value and $$z$$ the disturbance value.

Did I interpret the components correctly for this context:

A robot has a ultrasonic sensor which measures the distance to the nearest object in centimetres. The robot has two motors, a motor for the left wheels and a motor for the right wheels. The robot should hold 50 centimetres distance to the nearest found object. In order to adjust the current position of the robot, the motor speed for both motors are calculated as follows $$(currentDistance - 50) * 2$$.

In this context, $$w$$ is 50, the distance which should be kept to the nearest found object, $$x$$ the current measured distance and $$e=x-w$$ the error. The controller is a P-controller which multiplies the error by a constant 2. The output of the controller is therefore $$y=e*2$$ which is used to set the new speed of the motors (plant). If this is not correct, please correct me.

The question I have is, what could be the disturbance $$z$$ in this context. Is there actual any disturbance here? Could I just say the disturbance is 0?

$$z$$ could be a change in wind direction, a change in the supply voltage (requiring adjustment of the PWM to the motors to compensate), a change in the slope of the surface that the objects are on due to movement, etc. It's some external interference with the plant.
• I think your description is correct. The main thing about the feedback is that it corrects for a controller and plant whether it's linear or not. The $z$ term is just messing with the plant performance but the loop will correct it. In many situations the P-only control won't completely eliminate the error so integral control is added and derivative control can be added to react more quickly. My answer to electronics.stackexchange.com/questions/346730/… may help you. Jun 12, 2022 at 21:03