## Appendix A MATLAB Code  
For the reader's convenience, the MATLAB code comparing the frequency responses for the ATMD, sub-optimal STMD, optimized STMD, and TMD is provided. The main script, responsible for calculating and plotting the responses, can be found in Table A1. This script utilizes the following functions:  
*'mm_FRF.m' (Table A2): Calculates the frequency response;
*'mm_fa_gains.m' (Table A3) and'mm_fsa_gains.m' (Table A4): Compute the parameters for active and semi-active control forces, respectively;
*'mm_DH_tuning.m' (Table A5): Implements the Den Hartog tuning;
*'mm_equivv_linear.m' (Table A6): Performs the equivalent linearization of the clipped viscous damping-stiffness force. For each formula implemented in the code, the corresponding equation number from the paper is provided. \begin{table}
\begin{tabular}{l} \hline function [DAFX1, DAFXd] = mm\_FRF(m1, om1, m2, k2, c2, om, Fexc) \\ \% Frequency response \\ \% Outputs: DAFX1, DAFXd - dynamic amplifications of disp. amplitudes X1 and Xd \\ kl = om1\^{}2\^{}m1; \% structure’ stiffness, N/m \\ \% Complex amplitudes of harmonic response: \\ num = k2-om\^{}2\^{}m2+ 1\^{}in0m\^{}.\textasciitif{}c2; \\ den = (k1-om\^{}.\^{}2\^{}(m1+ m2))*(k2-om\^{}2\^{}m2+ 1\^{}in0m\^{}.\textasciitif{}c2) - om\^{}4\^{}m2\^{}2; \\ x1 = Fexc * num\^{}./den; \% structural mass complex amplitude, Equation (8) \\ xd = Fexc * om\^{}2\^{}2\^{}m2. /den; \% relative complex amplitude, Equation (9) \\ \% Displacement amplitudes: \\ X1 = abs(x1); \% absolute amplitude X1 of mass m1, m \\ Xd = abs(xd); \% relative amplitude Xd, m \\ \% Dynamic amplification factors: \\ X1 static = Fexc/k1; \% static deflection due to the excitation force, m \\ DAFX1 = X1/X1 static; \% dynamic amplification of X1, Equation (10) \\ DAFXd = Xd/X1 static; \% dynamic amplification of Xd \\ \hline \hline function [ca, ka] = mm\_fa\_gains(K, m1, om1, mu, om) \\ \% Viscous damping–stiffness force parameters \\ \% Outputs: ca, ka - parameters of the control force given by Equation (12) \\ ca = m1\^{}com1\^{}sqrt(3\^{}mu\textasciitif{}3/(2\textasciitif{}c^{*}\text{Kcor}^{ *}(1+\text{mu})\textasciitif{}3)); \% Equation (31) \\ ka = m1\^{}(K\^{}\text{mu-mu}))/(K\^{}mu+K) * (om\^{}.\^{}2- om1\^{}2/(mu+1)); \% Equation (32) \\ \end{tabular}
\end{table} 
Table 10: MATLAB function for calculation of the control force parameters of ATMD. Appendix B Analytical Calculations of Integrals in the Equivalent Linearization for a Clipped Viscous Damping-Stiffness Force  
We calculate the integrals in (42) and (43) as the sum of the definite integrals in those time intervals where the force is not clipped to zero. For harmonic displacement \(x_{d}=X_{d}sin(\omega t)\), and velocity \(\dot{x}_{d}=\omega X_{d}cos(\omega t)\), (42) and (43) can be expressed as:  
\[c_{eq}=\frac{1}{X_{d}\pi}\int_{0}^{2\pi/\omega}(c_{a}\omega X_{d}cos(\omega t) +k_{a}X_{d}sin(\omega t))cos(\omega t)dt,\] (A1)  
\[k_{eq}=\frac{\omega}{X_{d}\pi}\int_{0}^{2\pi/\omega}(c_{a}\omega X_{d}cos( \omega t)+k_{a}X_{d}sin(\omega t))sin(\omega t)dt.\] (A2)  
To facilitate the description, let us assume:  
\[k_{eq}=A+B,\] (A3)  
\[c_{eq}=C+D,\] (A4)  
where for the harmonic motion, the integrals A, B, C, D become independent of the amplitude \(X_{d}\):  
\[A=\frac{c_{a}\omega^{2}}{\pi}\int_{0}^{2\pi/\omega}sin(\omega t)cos(\omega t)dt,\] (A5)  
\[B=\frac{k_{a}\omega}{\pi}\int_{0}^{2\pi/\omega}sin^{2}(\omega t)dt,\] (A6)  
\[C=\frac{c_{a}\omega}{\pi}\int_{0}^{2\pi/\omega}cos^{2}(\omega t)dt,\] (A7)  
\[D=\frac{k_{a}}{\pi}\int_{0}^{2\pi/\omega}sin(\omega t)cos(\omega t)dt.\] (A8)  
Integrals (A5)-(A8) will be calculated in the three intervals marked in Figure 4a, for the case of negative stiffness \(k_{a}\). The interval 1 is defined from 0 to the time instant corresponding to point J in Figure 4a and can be given by (0, \(arcsin(\alpha)/\omega\)), where \(\alpha\) is the clipping coefficient (37).