hello
Butterworth filters do have ripples in their step response...
look at the step response of your Butterworth filter with fc = 80 Hz :
(x axis is samples not seconds as displayed !)
now that you have lowered the fc to 15 Hz, it's getting very long until the filter's output is steady again :
no surprise , it takes 5 time longer and with oscillations
so you should maybe use Bessel filters instead (step response do not exhibit any oscillation)
this is my suggestion below , you can change filtorder and fc as you wish, this will affect how close the envelop will be to the "real" one, but the ripples are gone
finst = linspace(f0,fT,Nt);
phi = 2*pi*cumsum(finst)*dt;
A = d1+(a1 * exp(-b1 * (t - T/c1).^2 + 1j * int_phi0));
[b,a] = besself(filtorder,fc,'low');
[bcoeff,acoeff] = c2dm(b,a,1/fs,'tustin');
Afilt = filtfilt(bcoeff,acoeff,q.*exp(-1j*phi).');
plot(t,abs(Afilt),'r','LineWidth',2)
title('q(t) and A(t) - filtered')
finst = linspace(f0,fT,Nt);
phi = 2*pi*cumsum(finst)*dt;
A = d1+(a1 * exp(-b1 * (t - T/c1).^2 + 1j * int_phi0));
[b,a] = besself(filtorder,fc,'low');
[bcoeff,acoeff] = c2dm(b,a,1/fs,'tustin');
Afilt = filtfilt(bcoeff,acoeff,q.*exp(-1j*phi).');
plot(t,abs(Afilt),'r','LineWidth',2)
title('q(t) and A(t) - filtered')