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

Could I have your opinions on PID type selection?

System description

1. Here comes a very simple system: Output(t) = $k * (Input(t) + systemVariable(t))$. $k$ is constant and $systemVariable(t)$ is a system constant which may change according to time.
2. The goal of the whole system is to maintain system output at $0$. It has to be as close to zero as possible. The controller has to compensate the $systemVariable$.
3. The change ($systemVariable$ ) is modeled by a very slow ramp.

Controller description

1. The controller's input is the output of the system. However, the measurements are always noisy, and I modeled Band-Limited White Noise into the measurements.

2. After PID controller, the output goes into an integrator, since the PID controller always calculates the "change" of the plant input.

Questions

1. My original thoughts: Add a PID controller with P=1/k is enough. Since every time the controller gets an error $e$, it can be calculated back that the compensation on controller output shall be $e/k$. However, Matlab auto-tuning always give me a PID. Why is that?

2. What is the relation between P of PID and measurement noises? If P is large, the system will tend to be rambling largely, due to the noises. If P is small, the system will tend not to converge to the correct value or very slow. How to make the trade-offs? Or how to prevent system from rambling largely and get quick system responses?

Thanks a lot!

• How could I help you? – richieqianle Mar 28 '16 at 3:27
• Is this question still valid? As far as your description goes, the system is static (no dynamic), deterministic (no noise on the system), time varying (variable unknown parameters). Hence, you need to estimate $k$ and $SystemVariable=p(t)$ and the optimal controller is the trivial inversion:$$u(t)=y(t)/k_e-p_e(t)$$ which can be seen as a P controller with gain $1/k_e$, offset $p_e(t)$ and zero reference.... – Brethlosze Mar 28 '16 at 3:32
• Any other controller, including a P without the offset, is out from the optimal. If $k$ and $p(t)$ are known, you dont have to estimate them too... – Brethlosze Mar 28 '16 at 3:39
• If the "system" have an additive output noise, the system will be: $$y(t)=k(u(t)+p(t))+e(t), e(t) white noise$$, but the problem is fairly the same. The system will be static, stochastic, time varying, and with the same trivial inversion as before (provided you represent the noise as a White Noise instead of a Band Limited one... – Brethlosze Mar 28 '16 at 3:44
• My question has problems with it. I will modify it later based on my new findings. Thanks! – richieqianle Mar 28 '16 at 4:10