0

I have a question on a noise phenomenon in PD control. The given system is just

x''=k*(xd-x)-d*x'       (1)

where x is the state variable like displacement, xd is the desired state (set point), the superscript (') is the time derivative of the variable, and k & d are the PD gains, respectively. I'm using Euler method to solve equation (1) in real time.

The question is that the PD control in equation (1) causes a noise if xd is controlled MANUALLY.

If xd is generated automatically from a sine function, the PD control works very well without noise trouble. Of course, various functions such as sin(t)cos(t), sin^2(t), and sin(2t) also works well regardless of their complexity.

If I use a control like dial or slider in the front end, however, PD control term causes terrible noise. I do not know why this noise occurs. Is there anyone who can help me?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38

1 Answers1

0

This is not really a full answer, but I do not have enough reputation to post a comment, so here it is.

First, could you please post pictures of your noisy vs. non-noisy charts? And what is the sample rate that you are using to solve the ODE? Is this done in the Control Design and Simulation loop, or another structure like a timed loop?

My first thought regarding the noise is that when you use LabVIEW to provide inputs, you are providing "smooth" inputs, i.e. the time derivatives of your inputs do not have any sudden breaks in them; they are sines and cosines just like the inputs themselves. When you control the VI manually, however, you are causing sudden changes in input that may not be "smooth", and this choppiness causes noise.

The discrete derivative, x', is (Euler Method):

      x(k) - x(k-1)
x' = ---------------
           Ts

Where x(k) is the state at the kth time step, and Ts is the sample time. If the difference x(k) - x(k-1) is too large, you end up with a large instantaneous x' that gets multiplied by your derivative gain Kd, and you end up amplifying your noise. You could try adding a low-pass filter to your controller, which is a fairly common implementation with PID algorithms anyway (Filtered PID, page 5).

        s*K*Td
Kd = -------------
      1 + s*Td/N

For a controller of the form u = K*x + Kd*x'.

Engineero
  • 12,340
  • 5
  • 53
  • 75