Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Control Theoryplease advise if cont theory should be in system design threads

  1. Apr 12, 2010 #1
    not sure why my earlier post never showed, but I'll try again.

    I'm doing some work to control a pump that's the input to a pneumatic system. I developed a transfer function that defines the plant as the output pressure divided by the input pressure. I also developed a controller: PID&I (double integrator b/c of a zero at the origin). The pump of my system can not be adjusted to change the flow. It can only on or off. So, we've (my advisor and I) have decided to control the system by duty cycling the pump.

    To determine the length of the time the pump should be on, my advisor instructed me to rearrange my block diagram. Originally it was just a plant*controller with a step input and unity feedback:
    Original TF = PC/(1+PC) where P=plant and C=controller.

    The new block diagram for determining the length of time the pump should remain on is the controller in the feedforward path and the plant in the feedback so the new TF
    New TF = C/(1+CP). I believe this TF is the pressure after the controller divided by the input pressure.

    My adviors expects the result to be an s-shaped curve where the initial slope is zero, the function ramps to 1. and the final slope of the function is zero. I however do not get this. I get just a ramp.

    Does anyone understand this approach? Is it possible that there's a different way to do this?
  2. jcsd
  3. Apr 13, 2010 #2
    Control Theory and PID tuning

    I've been working to find a PID controller for the following TF
    TF = --------------------------
    B1s^3 + B2s^2 + B3s + B

    The "s" term in the numerator is giving a great deal of grief. I've been trying to use a PID controller with an additional integrator to cancel the zero at the pole. I used a ramp and followed Ziegler-Nichols first method to determine the best Ti and Td values. I then plotted the open loop Plant plus controller using Z-N Ti and Td values to find the system gain which resulted in a damping coefficient of .707.

    The actual system input is a step. When I plot the closed loop system response with a step input and increase Kp from the Z-N value, the system damps more and more. This should not be. The system should have greater overshoot and more oscillations with increased Kp values. Does anyone know why I'm getting this result? The system behaves as it should and damps more with increased Kd. Any advice would be appreciated. Thanks.
  4. Apr 13, 2010 #3


    User Avatar

    Staff: Mentor

    They both posted here in EE. I'll merge them together into one thread for you.
  5. Apr 13, 2010 #4
    These are a bit different. The first posted never went through so I rewrote it, but then I wrote a different post. I just hope someone can help.
  6. Apr 13, 2010 #5
    Nice, interesting problem.

    The duty cycle can only be 0% to 100% so your controller (in the time domain) can only output 0 to 1. It wouldn't make any sense to have, for example, a 200% duty cycle. I whipped up a little drawing.

    Untitled 1.jpg

    When the error signal is high, we want the controller to put out 100% so that the pressure can catch up. When the error signal is low, we want the controller to slow down. So what kind of function can be limited from 0 to 1, curved into an S shape, and have a slope of 0 at the ends? A Bezier curve!

    Untitled 3.jpg

    This function can be piecewise continuous. It's a straight line on the ends and a Bezier curve between the points. Because it's piecewise continuous, you should be able to do a Laplace transform of it and then you can do any stability analysis that you need.

    There may be better ideas for a function but I hope this helps.

    Edit: fixed the pictures.
    Last edited: Apr 13, 2010
  7. Apr 13, 2010 #6
    I just had a thought. Converting a parametric equation like the Bezier curve to a regular equation can get nasty so maybe I should provide a little more. In fact, you may not be interested in parametric equations at all so let me just cut to the chase.

    I made up a cubic Bezier and then constrained it and converted it from parametric variables to function variables. The following controller would have all the properties you need.

    [tex] x = e(t) [/tex] the error signal e(t)

    [tex]C(x) = 0[/tex] for x < 0.

    [tex]C(x) = \frac{3}{9}x^2 - \frac{2}{27}x^3 [/tex] for 0 =< x < 3

    [tex]C(x) = 1[/tex] for 3 =< x .

    It's piecewise continuous. The derivative approaches 0 from either direction at [x=0] and [x=3]. It is S-shaped so it should have good response properties (it will slow the pump gracefully as the error signal approaches 0).

    You can scale the controller by substituting (x -> ax) and stretch or shrink the curve (make it steeper or more shallow). Also, this is not the only S shaped curve that will fit your needs. There are lots more you could try (think higher order).
  8. Apr 13, 2010 #7
    Thank you, and I may end up using this approach. In the mean time can anyone explain why I get a linear function when the expected result is an "s-shaped" curve?

    I little more background.

    My open loop system is a controller * Plant with a step input and unity feedback. My advisor suggested I look at the output after the controller before the plant and plot this TF with a step input.

    | |

    The TF for this configuration is
    0.1741 s^7 + 137.8 s^6 + 511.8 s^5 + 888.8 s^4 + 662.1 s^3 + 166.9 s^2
    0.002721 s^7 + 2.147 s^6 + 33.96 s^5 + 75.43 s^4 + 89.24 s^3

    Since the numerator is larger than the denominator I divided in MATLAB to find the remainder and quotient.

    The TF of the remainder divided by the original denominator
    0.4 s^6 - 1661 s^5 - 3938 s^4 - 5048 s^3 + 166.9 s^2
    0.002721 s^7 + 2.147 s^6 + 33.96 s^5 + 75.43 s^4 + 89.24 s^3

    The plot of this this last TF with a step input is a linear function. My advisor expects this to result in an "s-shaped" curve. I need the "s-shaped" curve to determine how long the pump should stay on. The length of time is hard coded into the program. The pump is only on for this amount of time. If the desired pressure is not reached the pump turns on again but only for the length of time specified in the code. This is to help prevent overshoot.

    Why am I getting a linear function when the expected result is an "s-shaped" curve?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook