My colleague Sofia have found a paper [1] where authors report the analytic approximation of the piece-wise linear step function with the so-called squashing function firstly introduced in [2].
This function has two parameters related to the position of the center γand the amplitude and one parameter that controls the curvature β:
The code below show this function at work
clear variables, close all
% time axis
t = linspace(-2,4,1000).';
% step function params
Tr = 2; % rise time
A = 2; % max value
T50 = 2; % half rise point
% piece-wise linear step function
x = @(t)(t > T50-Tr/2 & t < T50+Tr/2).*(A/Tr.*(t-T50)+A/2)+(t >= T50+Tr/2).*A;
% squashing function
y = @(t,beta)A/Tr*log(((1+exp(beta*(t-T50+Tr/2)))./(1+exp(beta*(t-T50-Tr/2)))).^(1/beta));
% plot
figure, hold on, grid on
plot(t,x(t))
plot(t,y(t,5))
plot(t,y(t,20))
legend('linear','squashing \beta = 5','squashing \beta = 20','Location','best')
[1] A.I. Iliev, N. Kyurkchiev, S. Markov, On the Approximation of the Cut and Step Functions by Logistic and Gompertz Functions, Biomath Vol 4, No 2 (2015) 1-12, dx.doi.org/10.11145/j.biomath.2015.10.101
[2] J. Dombi and Z. Gera, The Approximation of Piecewise Linear Membership Functions and Lukasiewicz Operators, Fuzzy Sets and Systems 154(2) (2005) 275–286, http://dx.doi.org/10.1016/j.fss.2005.02.016
EDIT
The exponential term of the squashing function can become very large for large (positive) times (i.e. if the argument of the exp function is larger than about 700). I suggest to edit the function using simple algebra