Mupad: no solution for critically damped system?

1 view (last 30 days)
I was working through a simple example of a 1st order plant 2/(s+1) which is controlled by an integral controller K/s. We wanted to evaluate the integral squared error (closed loop, unit step response) as a function of K so we tried to solve the closed loop response in Mupad using
sys := ode({y''(t)+y'(t)+2*K*y(t)=2*K*heaviside(t), y(-1)=0, y'(-1)=0}, y(t));
yr := solve(sys);
The problem is that when K=1/8 and the response should be critically damped with two poles at -1/2, the Mupad calculated solution is null. The calculated solution is correct when the poles are distinct. I've tested with both 2012 and 2014. Obviously, this causes a problem with the subsequent ISE calculation as the integral (to infinity) does not converge for this incorrect solution
  2 Comments
Walter Roberson
Walter Roberson on 23 May 2015
Addressing only the ODE portion and not the control theory (because I do not know anything about poles), when I solve using Maple, I get
y(t) = -(1/2)*((1+sqrt(1-8*K))*exp((1/2*(-1+sqrt(1-8*K)))*t)+(-1+sqrt(1-8*K))*exp(-(1/2*(1+sqrt(1-8*K)))*t)-2*sqrt(1-8*K))*Heaviside(t)/sqrt(1-8*K)
which has a division by 0 if you simply substitute in K=1/8 blindly. However if you take limit() of that as K=1/8 then the solution is the same as Maple finds if the 1/8 is coded directly into the ode,
y(t) = -(1/2)*Heaviside(t)*(-2+(t+2)*exp(-(1/2)*t))
I don't know if this helps.
Martin Brown
Martin Brown on 26 May 2015
Yes, that's correct and is the answer given by mupad for k!=1/8 and the limiting case is also correct. Mupad separates the cases into two k=1/8 and k!=1/8 but returns a null solution for the former rather than something like
exp() + t*exp()
which is surprising for solving a simple 2nd order, lti ode.
The division by 0 occurs because the coefficients tend to infinity as k->1/8 and the exponents become equal. The control bits are only there for background to the question.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!