I have a generic problem to create a controller for the following system: $$\ddot{x}(t) = a y(t)$$ where $a$ is a constant real value. The system could be seen as an equivalent of a mass-spring-damper system, where damper and spring are removed. Also $x(t)$ is the $x$ dimension and $y$ is simply the force moving the mass. BUT in this case I need to drive the force using $x(t)$ and not the contrary.

Transforming according Laplace I get: $$ y(t) = \frac{1}{a}\ddot{x}(t)$$ $$ Y(s) = \frac{1}{a}s^{2}X(s)$$ $$ G(s) = \frac{Y(s)}{X(s)} = \frac{s^{2}}{a}$$

Considering that $a = 1$ I implemented a possible example in Simulink.

enter image description here

Please not that I put the output given by the scope for showing up the resulting answer of the system.

So I have 2 questions:

  1. Is it possible to develop such a system? As far as I know the degree of the numerator should be $=<$ the degree of the denominator. So is the above system possible?
  2. Is it possible to create a PID or PD controller to stabilize the output of the system?



3 Answers 3

  1. Nope, the system is not feasible since the causality principle states that the degree of the denominator of the transfer function must be greater or equal to the degree of the numerator, as you have correctly pointed out. The system analysis, indeed, does always proceed in terms of integral blocks (i.e. $1/s$) and not derivatives. In this respect, what is the system you have in mind? Are you 100% sure that you caught all its implications?

  2. Even assuming the double derivatives as a purely ideal system to stabilize - only in simulation -, a PID is unable to cope with the task. Imagine we are at equilibrium, then the system output $y$ is equal to the input $r \neq 0$ and the error $e=r-y$ before the PID is thus zero. However, a constant output means that upstream to the double derivatives we must have a signal $u$ varying as $t^2$. The signal $u$ is also the PID output, while the PID input is $e=0$, as said. You must have then a double integrator in the PID. But this is only a theoretical speculation.


As far as I can see, what you have there is just a system where you're inputting a scaled acceleration.

$$ \begin{bmatrix} \dot{x}(t)\\ \ddot{x}(t) \end{bmatrix} = \begin{bmatrix}0 & 1\\ 0 & 0\end{bmatrix}\begin{bmatrix}x(t)\\\dot{x}(t)\end{bmatrix} + \begin{bmatrix}0\\a\end{bmatrix}y(t) $$ $$ \dot{x} = Ax + By $$ In classical state space representation. The controllability matrix has full rank, so the system is controllable. That is we need to design some matrix K such that:

$$ \dot{x} = (A-BK)x $$

is stable. For a continuous time system, this means that $(A-BK)$ must have negative real parts on its eigenvalues. Now if:

$$ K = \begin{bmatrix}k_1 & k_2 \end{bmatrix} $$


$$ (A-BK) = \begin{bmatrix}0 & 1\\ -ak_1 & -ak_2\end{bmatrix} $$

with eigenvalues

$$ \lambda_1 = \frac{-ak_2 - \sqrt{a^2k_2^2 - 4ak_1}}{2} $$ $$ \lambda_2 = \frac{-ak_2 + \sqrt{a^2k_2^2 - 4ak_1}}{2} $$

Here $k_1$ is the P value and $k_2$ is the D value in a PD controller that uses $x(t)$ as the "driving force". For any given nonzero $a$, they can be be chosen to stabilize the system w.r.t $x$. Note also that: 1) if $k_2=0$ we can't stabilize the system and 2) at any point in time $y(t) = -ak_1x(t) -ak_2\dot{x}(t)$. As $y(t)$ depends on $x(t)$ and $\dot{x}(t)$, both of which go to zero, $y(t)$ goes to zero. Did I understand your question correctly?


  • 1
    $\begingroup$ You're solving the classical scheme using $y\left(t\right)$ as the input, whereas he wants it as output. $\endgroup$ Apr 5, 2015 at 15:33
  • $\begingroup$ @Ugo, the OP is confusing the readers by not clearly state the input and the output. " y is simply the force moving the mass" which means the input of the system but the OP said later "BUT in this case I need to drive the force using $x(t)$ and not the contrary" which makes no sense, therefore the upvote this answer to at least handle the opposite case. $\endgroup$
    – CroCo
    Apr 8, 2015 at 2:06
  • $\begingroup$ Well, nope: even though it's impossible, the problem remains clearly stated. Read it better. Also, I did not down vote this answer :-) $\endgroup$ Apr 8, 2015 at 6:18
  • $\begingroup$ I thought he meant a case where he needs to construct a reference model. So that he has some system that is driven by $\ddot{x}$, and needs to reconstruct that from some reference $x(t)$. $\endgroup$
    – user51164
    Apr 8, 2015 at 7:22

The system could be seen as an equivalent of a mass-spring-damper system, where damper and spring are removed

This is correct if you assume $x(t)$ to be the output but you are not.

y is simply the force moving the mass.

If $y$ is the force, this means it is the input of the system?!

BUT in this case I need to drive the force using x(t) and not the contrary

This is impossible. What you are saying makes no sense.

This is not a dynamic system and your simulink diagram is not correct. Your actual system is an amplifier of the second derivative of a given signal. You have the output as a function of time (i.e. $y(t)$), therefore there is no point of applying transfer function tool. The input of this system is the second derivative of a given signal, thus if the input is the step function which means $x(t) = 1, t \geq 0 $, its second derivative is zero. If you set the input as $x(t) = sin(t)$ and $a=0.5$, the output is

enter image description here

and this is the matlab script for the above picture.

clear all; clc;

dt = 0.0001;
t = -pi:0.01:2*pi;

x = sin(t); % the input 
% plot(t, x, 'b')

dx = diff(x)./diff(t); % the first derivative of the input 
% hold on 
% plot(t(2:end), dx, 'r')

ddx = diff(dx)./diff(t(2:end)); % the second derivative of the input
% hold on 
plot(t(3:end), ddx, 'b')

a = 0.5;

% output
y = 1/a * ddx;
hold on 
plot(t(3:end), y, 'r')

l= legend(['$\ddot{x}(t)$'], 'y(t)');
  • $\begingroup$ Isn't the second derivative of $sin\left(t\right)$ equal to $-sin\left(t\right)$? This is the principle underlying the harmonic motion. There must be something strange in the graph then. Also the legend should be like legend('x(t)','y(t)=1/a * $\ddot{x}(t)$'). $\endgroup$ Apr 8, 2015 at 8:24
  • $\begingroup$ @Ugo, no there is nothing wrong with the graph. What I'm showing is the input of the system (i.e. not the signal input) which is the second derivative of a given signal, therefore the legend is correct in my case. $\endgroup$
    – CroCo
    Apr 8, 2015 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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