I have bounded first-order dynamics:
$X_{min} = 0, X_{max} = 2, T=0.01, U = X_{max}$
$\frac{X(s)}{U(s)} = \frac{1}{Ts+1}$
I need to compute:
$\dot{X}_{max}$
So far I've end up with Matlab/Octave code:
T_sim = 1; % simulation time (sec)
dt = 0.005; % time step
N_step = floor(T_sim/dt); % number of steps
time = 0; % current time (sec)
time_plot = zeros(1, N_step);
x_plot = zeros(1, N_step);
x_c_plot = zeros(1, N_step);
x_min = 0;
x_max = 2;
x_rate_max = 0;
x_prev = x_min; % previous value is minimum
u = x_max; % commanded value is maximum (step input)
T = 0.01; % time constant
for i = 1:N_step
% first-order dynamics in Laplace form: X(s)/U(s) = 1/(T*s + 1)
% discretized system (ZoH):
% x(k+1) = exp(dt*(-1/T))*x(k) + (1 - exp(dt*(-1/T))) * u(k)
alpha = exp(-dt / T);
x = alpha * x_prev + (1 - alpha) * u;
x_rate = (x - x_prev)/dt; % current rate
x_rate_max = max(x_rate, x_rate_max); % maximum rate
x_plot(i) = x;
x_c_plot(i) = u;
x_prev = x;
time_plot(i) = time;
time = time + dt;
end
plot(time_plot, x_c_plot, ";x_c;");
hold on;
plot(time_plot, x_plot, ";x;");
hold on;
grid on;
Which gives me x_rate_max = 157.39 and the step response is:
So the questions:
Is this result correct?
If it is then how to solve the opposite task and to compute $T$ based on the given $\dot{X}_{max}$?

Given a first order transfer function
$$ G(s) = \frac{K}{T s + 1} $$
In time domain with a step input of height $\bar{U} = U_{max} - U_{min}$ that is:
$y(t) = \bar{U}\, K \, (1 - e^{-t/T})$
So you can take the derivative with respect to $t$:
$$ y'(t) = \frac{\bar{U}\, K}{T} e^{-t/T} $$
The derivative has a maximal value at $t = 0$ (directly at the step) because the $e^{-t/T}$ is monotone decreasing from $1$ to $0$ asymptotically (of course we assume $T > 0$ so that $G$ is stable).
So the maximum rate is
$$ y_{max}' = \frac{\bar{U}\, K}{T} $$
so it only depends on $T$ and $\bar{U}\, K$, which is the maximum value your actuator can produce. For your second question, you can of course solve this for $T$:
$$ T = \frac{\bar{U}\, K}{y_{max}'} $$
In your case, $K = 1$, $T = 0.01$, $U_{min} = 0$, $U_{max} = 2$, so you have
$$ y_{max}' = \frac{(2 - 0) \times 1}{0.01} = 200. $$
The difference from that value to your code comes from the discretization. Here are some values you get for different sample times
dtwith your simulation:So you can see that the estimated value approaches the theoretical value of $200$ we just computed.