1
$\begingroup$

I have a real mechanical system (ball & beam) which I want to control. The system is approximated by the second order transfer function:

$$ T(s) = \frac{b_0}{s^2+a_1s+a_2} $$

and in state-space form:

$$ \dot{x_1} = x_2 $$ $$ \dot{x_2} = -a_1x_2-a_2x_2+b_0u $$

where the parameters $\ b_0,a_1,a_2 $ have been identified, so they are known. I have designed two controllers. The first one is a full state feedback controller described by the equation:

$$ u = -Kx+k_rr $$

where the term $\ k_rr $ is because I want input reference $\ (r) $ tracking. The other controller is a dynamic state feedback controller desctibed by the equations:

$$ u = -Kx-k_iz $$ $$ \dot{z} = x_1-r $$

Both controllers are doing well but the only problem I have is when the ball reaches the reference point there is a bit of oscillation of the system (the beam oscillates) in order to keep the ball at the desired point. I have found out that the oscillations occur due to the measurement of the ball's position and not because of the gains of the controllers because this happens even if I make these gains smaller. The sensor used to measure the ball's position on the beam is a linear potentiometer and it appears that the measurements include some unwanted noise which results to rapid changes of the control signal which leads to the oscillations. I have tried to reduce the noise by using a low pass filter with the below transfer function:

$$ F(s) = \frac{15}{s+15} $$

The block diagram of the control loop is:

enter image description here

The oscillations have been reduced but not achieved a satisfactory level. Is there any way to modify these controllers in a way to affect these oscillations and reduce them ? Would a PID-controller perform better due to the existence of the derivative of the error ? Or should I design a better filter for the noise reduction which should also be fast (because the system is functioning in real time) enough ?

I place some plots for two different cases (PD-controller gains) where the actual position (output) is shown compared to the reference and the control signal. Note that the sudden changes to the real system's output are due to external disturbances I apply in order to check if the system goes back to the reference.

  • First Case ($\ K_p = 3.9352 $ & $\ K_d = 2.248 $):

enter image description here

enter image description here

  • Second Case ($\ K_p = 2.3536 $ & $\ K_d = 1.6423 $):

enter image description here

enter image description here

$\endgroup$
  • $\begingroup$ Try a higher order lowpass filter. $\endgroup$ – useless-machine Mar 13 at 23:39
  • $\begingroup$ You probably need an analog low pass filter to condition your sensor output before you digitize it. (Of course that can be as simple as a passive RC circuit) $\endgroup$ – alephzero Mar 14 at 1:33
  • $\begingroup$ @alephzero Generally hardware is fixed. However, I tried implementing such a filter somewhere I could intervene but nothing changed. Thanks, anyway! $\endgroup$ – Teo Protoulis Mar 15 at 13:44
  • $\begingroup$ Can you post any plots? A time history of the sensor reading? time history of the control effort at various gains? a block diagram of where in the loop you are putting your low pass filter? that might help you get better answers. $\endgroup$ – Daniel K Mar 16 at 10:59
1
$\begingroup$

You can change the type and/or order of the lowpas filter.

Your current filter has a -3 dB reduction at 15 rad/s (~2.4 Hz) and decreases with a -1 slope every decade. This means that at 150 rad/s (~24 Hz) the amplification is still -10 dB (factor 0.1), which is not that much. Therefore you could change the order of the filter, e.g. $$F(s)=\frac{1}{(\tau\cdot s + 1)^n} $$ with $\tau = \frac{1}{15}$ and $n$ the desired order.

However, this filter will have some disadvantages when going for higher orders, therefore you could consider the Butterworth filter.

If the noise is present at a certain frequency, you should use a Notch filter to suppress signals at the selected frequency band.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.