How to Temporarily Change the Impact Size and Its Persistence in Pulse Response

Hello everyone

How can I suddenly change the size and duration of the impact in a certain period after it occurs, as in this literature? How should I write the code?

I hope to receive your help, thank you!

Without more details on the exact experiment it is impossible to tell.