1 Introduction

Energy dissipation systems are technologies able to improve the performance of structural systems subject to transient excitations. Their purpose is to dissipate or reduce part of the energy generated by the dynamic excitation and transferred to these systems. Thus, it is possible to reduce the deformation demand upon the structural systems considered. In fact, if properly designed, they can reduce specific systems’ responses of interest, such as selected displacements and accelerations. These technologies can be divided into passive systems, active and semi-active systems (Soong and Dargush 1997; Constantinou et al. 1998). In each of these categories, there are a wide variety of different technologies nowadays well developed and widely used. Examples of their applications are: The seismic retrofitting of buildings subject to seismic excitation with viscous dampers (e.g. Takewaki 1997; Lavan and Levy 2005; Kanno 2013) and tuned-mass dampers (e.g. Almazán et al. 2012; Daniel and Lavan 2015); The reduction of wind and earthquake induced vibrations in high-rise buildings (e.g. Yang et al. 2004; Smith and Willford 2007; Infanti et al. 2008); The seismic protection of bridges with viscous dampers (e.g. Infanti et al. 2004; Simon-Talero et al. 2006; Infanti and Castellano 2007); The control of human-induced vibrations (Caetano et al. 2010; Casado et al. 2013); The vibration control of offshore wind turbines (e.g. Brodersen and Høgsberg 2016); The shock absorption for high-speed boat seats (e.g. Klembczyk and Mosher 2000); The structural control of dynamic blast loading (e.g. Miyamoto and Taylor 2000); The design of passive and semi-active suspension systems for cars subject to road excitation (e.g. Georgiou et al. 2007; Suciu et al. 2012).

The efficacy of the energy dissipation systems is strongly related to their location in the system that needs to be controlled and to their size. For these reasons, often their design is based on optimization, to address the placement and sizing of these devices. For instance, in Lavan and Amir (2014) the authors distribute and size linear fluid viscous dampers in linear structures subject to seismic excitation with an optimization approach based on Sequential Linear Programming (SLP). This procedure is then further enhanced in Pollini et al. (2016) in order to consider a more complete and realistic objective cost function. In Kanno (2013) the author presents a mixed-integer programming approach for the optimal placement of viscous dampers in shear frames, where the damping coefficients are selected from a discrete set of values. A discrete optimization approach is presented in Dargush and Sant (2005), where different types of passive dissipation systems (i.e. metallic plate dampers, fluid viscous dampers, viscoelastic solid dampers) are sized and placed with genetic algorithms. Also in this case, the properties of the devices are selected from a predefined set of available sizes. In Georgiou et al. (2007) Georgiou, Verros, and Natsiavas present a methodology for the multi-objective optimization of the suspension damping and stiffness parameters of quarter-car models subjected to random road excitation. The authors consider both passive and semi-active suspension systems.

An important aspect related to optimization-based design methodologies is the computational effort that they require. This aspect can influence the preference for one of these methodologies over more traditional design techniques. Broadly speaking, there are two major sets of optimization approaches: the ones that rely on gradient information (i.e. first or second order gradients of the functions involved), and the ones that do not require this information and that are often referred to as zero order methods (e.g. genetic algorithms). These two sets have different advantages and disadvantages. Gradient-based approaches typically require reduced computational efforts, and more sophisticated mathematical tools. They are also less affected by the size of the problem considered. On the other hand, gradient-based optimization approaches are less robust from a computational point of view, meaning that, depending on the complexity of the problem considered, they may show difficulties in converging smoothly to a local minimum. For this reason they require users that are more familiar with these types of approaches. Nevertheless, they are typically preferred because they achieve good final designs with reasonable computational resources, thus promoting the use of optimization-based methodologies among practitioners and researchers in their everyday activities. On the other hand, zero order methods are more simple and easy to get started with, but they require very high computational resources that in many cases become even prohibitive. Moreover, the computational effort significantly increase with the complexity and the size of the problems considered. For these reasons, a significant effort and attention has been directed towards the development and application of gradient-based design approaches in several engineering fields.

A key element for the development of a gradient-based optimization approach is the sensitivity analysis (Haftka and Adelman 1989; Tortorelli and Michaleris 1994). In general there are three different approaches for the calculation of the sensitivities: The finite difference method; The direct differentiation method; And the adjoint variable method. The finite difference method is undoubtedly the most easy to implement, and it is typically used for comparison and verification of the sensitivity obtained with more accurate methodologies. The sensitivities obtained with the direct and adjoint method are identical and exact with respect to the numerical solution (Tortorelli and Michaleris 1994). However, the adjoint method is to be preferred when there are less functions to differentiate in comparison to the number of design variables, as in the applications towards which this paper is directed. In the adjoint variable method, the sensitivity is calculated by first expanding the function that needs to be differentiated into an augmented function and subsequently by differentiating the resulting augmented function. In principle, there are two ways to perform the adjoint sensitivity analysis. The first consists of differentiating the augmented function first, and in introducing only at the end the particular discretization adopted for the numerical solution of the problem. This approach is also referred to as “differentiate-then-discretize”. The second way consists in differentiating directly the discretized version of the problem at hand (Tortorelli and Michaleris 1994; Jensen et al. 2014). This approach, instead, is referred to as “discretize-then-differentiate”. In the literature there are several examples of optimization-based approaches that relied on the differentiate-then-discretize type of adjoint sensitivity analysis. Some dealt with the design of linear viscous dampers in linear structures subject to seismic excitation (Lavan and Levy 2006a, 2006b); others with linear viscous dampers in nonlinear structures subject to seismic excitation (Lavan and Levy 2005, 2010). Other examples, but in a different context, include: The work presented in (Turteltaub 2005) where Turteltaub proposed an algorithm to optimize the performance of a two-phase composite under dynamic loading; A topology optimization-based method for the systematic design of one-dimensional band gap and pulse converting structures, (Dahl et al. 2008); The design of non-linear optical devices based on topology optimization (Elesin et al. 2012). However, as it has been pointed out in Tortorelli and Michaleris (1994) and more recently in Jensen et al. (2014), optimization procedures based on a “differentiate-then-discretize” type of adjoint sensitivity analysis may lead to inconsistency errors. These may be caused, for example, by different time discretizations between the time-history analysis for the structural response and the sensitivity analysis. In order to avoid these sources of inconsistency, it is recommended to rely on a “discretize-then-differentiate” type of adjoint sensitivity analysis. For example, this type of adjoint sensitivity analysis is used in Le et al. (2012) for the topology optimization of linear elastic structures with spatially varying material micro-structures to tailor energy propagation. Also in Nakshatrala and Tortorelli (2016) the authors rely on a discretize and then differentiate type of adjoint sensitivity analysis, but in this case for the topology optimization of nonlinear elastic material micro-structures for tailored energy propagation. Very recently, the sensitivity analysis for dynamic systems non-viscously damped has been discussed in Yun and Youn (2017). Essentially, Yun and Youn extended the methodology discussed in Jensen et al. (2014) to the case of linear structures with damping forces which depend on the history of motion via convolution integrals. The discretize-then-differentiate adjoint variable method was also adopted recently in Pollini et al. (2017) for the seismic retrofitting of 3-D linear frame structures with nonlinear viscous dampers. However, to the best of the authors knowledge, the adjoint sensitivity analysis for hysteretic dynamic systems with nonlinear viscous dampers has not yet been developed.

Thus, in this paper we formulate a consistent adjoint sensitivity analysis for the optimization of hysteretic dynamic systems subject to transient excitation and equipped with nonlinear viscous dampers. The responses of interest are evaluated with nonlinear time-history analyses based on the Newmark-β method. The equilibrium in each time-step is achieved by means of the Newton-Raphson and the Runge-Kutta methods. The dampers are modeled with the Maxwell’s model for visco-elasticity. In this way, both the stiffening and damping contributions of the dampers are accounted for. The adjoint sensitivity analysis discussed herein is presented through a step-by-step procedure, and its validity and generality is then demonstrated with two design applications based on optimization: the seismic retrofitting of a structure subject to seismic excitation, and the design of a quarter-car suspension system.

The remainder of the paper is organized as follows: In Section 2 we present the governing equations of the systems considered, focusing on the equations for the dynamic equilibrium, and for the nonlinear behavior of the structures and dampers considered; The adjoint sensitivity analysis is then discussed with detail in Section 3; The general results of Section 3 are then applied to specific optimization problems in Section 4, followed by conclusions in Section 5.

2 Governing equations

In this paper we consider nonlinear systems equipped with nonlinear dampers and subjected to transient excitations. In what follows, we will focus on a single degree of freedom system for the sake of clarity. It should be noted that the methodology discussed herein can be generalized with no particular effort to the case of a multi-degree-of-freedom system. The governing equations for the dynamic equilibrium of these systems are the following:

$$\begin{array}{@{}rcl@{}} && m \ddot{u}(t) + c_{s} \dot{u}(t) + f_{s}(t) + f_{d}(t) = P(t), \quad \text{for}\;t \in [0,t_{f}]\\ && \dot{f}_{s}(t) = g_{s}\left( f_{s}(t),\dot{u}(t),u(t),t\right)\\ && \dot{f}_{d}(t) = g_{d}\left( f_{d}(t),\dot{u}(t),u(t),t\right)\\ && u(0)= 0, \; \dot{u}(0)= 0, \; f_{s}(0)= 0, \; f_{d}(0)= 0 \end{array} $$
(1)

where t f is the final time; u(t), \(\dot {u}(t)\), and \(\ddot {u}(t)\) are the displacement, velocity, and acceleration of the system with respect to a ground reference system at time t; m is the mass of the system; c s the inherent damping of the system; f s (t) the restoring forces generated by the structural elements; f d (t)the resisting forces produced by the nonlinear viscous dampers; and P(t)is the external load acting on the system. In the following sections we will introduce the specific models considered for the description of the nonlinear behavior of the added damping system (i.e. \(g_{d}\left (f_{d}(t),\dot {u}(t),u(t),t\right )\)) and of the structural components (i.e. \(g_{s}\left (f_{s}(t),\dot {u}(t),u(t),t\right )\)).

2.1 Nonlinear fluid viscous damper model

In what follows, we present the model considered for the definition of the mechanical behavior of the nonlinear dampers considered in this work. In particular, we model the dampers with the Maxwell’s model considering a spring and a dashpot in series, as shown in Fig. 1. The spring accounts for the stiffening property of the damper and its supporting member, and the dashpot for its viscous property.

Fig. 1
figure 1

Nonlinear viscous damper modeled with the Maxwell’s model

Equation (2) defines the compatibility and equilibrium equations of the damper model considered:

$$\begin{array}{@{}rcl@{}} u(t) &=& u_{el}(t) + u_{vd}(t), \; \dot{u}(t) = \dot{u}_{el}(t) + \dot{u}_{vd}(t) \\ f_{d}(t) &=& f_{el}(t) = f_{vd}(t) \end{array} $$
(2)

where u e l (t) is the elastic deformation in the spring at time t, u v d (t) is the deformation in the dashpot at time t, \(\dot {u}_{el}(t)\) and \(\dot {u}_{vd}(t)\) are the velocities in the spring an in the dashpot. Similarly, f e l (t)and f v d (t)are the forces in the spring and in the dashpot as functions of time, which are also equal because of equilibrium considerations. In the damper element, the spring is characterized by a stiffness coefficient k d . Therefore, the output force can be calculated with the following equation:

$$ f_{el}(t) = k_{d} u_{el}(t) $$
(3)

The viscous property of the dashpot is defined by a fractional power law (Seleemah and Constantinou 1997). More precisely, the nonlinear behavior of the dashpot is defined by the damping coefficient c d , and the fractional exponent α:

$$ f_{vd}(t) = c_{d} sgn\left( \dot{u}_{vd}(t)\right)|\dot{u}_{vd}(t)|^{\alpha} $$
(4)

where s g n is the sign function. We observe that for α = 1(4) represents the force-velocity behavior of a linear viscous damper. Similarly, for α → 0 (4) mimics the behavior of a friction damper. If we invert the force-velocity relation expressed in (4), we obtain the following velocity-force relation for the dashpot:

$$ \dot{u}_{vd}(t) = sgn\left( f_{vd}(t)\right)\left( \frac{|f_{vd}(t)|}{c_{d}}\right)^{\frac{1}{\alpha}} $$
(5)

By deriving (3) with respect to time, and substituting \(\dot {u}_{el}(t)\) with an equivalent formulation based on the compatibility equation presented in (2), we obtain the following equation:

$$\begin{array}{@{}rcl@{}} \dot{f}_{d}(t) &=& k_{d} \dot{u}_{el}(t) = k_{d} \left( \dot{u}(t) -\dot{u}_{vd}(t) \right) \\ &=& k_{d} \left( \dot{u}(t) - sgn\left( f_{vd}(t)\right)\left( \frac{|f_{vd}(t)|}{c_{d}}\right)^{\frac{1}{\alpha}} \right) \end{array} $$
(6)

Last, we can observe that the function g d of (1) can now be written explicitly as follows:

$$\begin{array}{@{}rcl@{}} &&g_{d}\left( f_{d}(t),\dot{u}(t),u(t),t\right)\\ &&\qquad = k_{d} \left( \dot{u}(t) - sgn\left( f_{vd}(t)\right)\left( \frac{|f_{vd}(t)|}{c_{d}}\right)^{\frac{1}{\alpha}} \right) \end{array} $$
(7)

2.2 Hysteretic model for inelastic systems

We introduce now the nonlinear model considered for the definition of the resisting force f s (t). The model considered is represented in Fig. 2. In particular, we consider a hysteretic spring with elastic-perfectly plastic behavior, and a smooth transition from the elastic to the plastic range (Sivaselvan and Reinhorn 2000). The stiffness k s is formulated as follows:

$$\begin{array}{@{}rcl@{}} &&k_{s}\left( f_{s}(t),\dot{u}(t),u(t),t\right)\\ &&\qquad =k_{0} \left[ 1 - \frac{1}{2}\left|\frac{f_{s}(t)}{f_{y}}\right|^{N}\left( sgn(f_{s}(t)\dot{u}(t)) + 1\right)\right] \end{array} $$
(8)

where the exponent N controls the smoothness of the transition from the elastic to the inelastic range, k 0 is the elastic stiffness, f s (t) the current force in the spring at time t, f y is the yielding force that marks the limit for the elastic range, \(\dot {u}(t)\) is the current velocity impressed on the spring at time t.

Fig. 2
figure 2

Model for the description of the structural resisting forces

The force in the spring can then be expressed in a differential form:

$$\begin{array}{@{}rcl@{}} \dot{f}_{s}(t) \!&=&\! k_{s} \dot{u}(t) \\ &=&\! k_{0} \left[ 1 \,-\, \frac{1}{2}\left|\frac{f_{s}(t)}{f_{y}}\right|^{N}\!\left( sgn(f_{s}(t)\dot{u}(t)) \,+\, 1\right)\!\right]\!\dot{u}(t) \end{array} $$
(9)

and the function g s introduced in (1) can then be written as follows:

$$\begin{array}{@{}rcl@{}} &&{} g_{s}\left( f_{s}(t),\dot{u}(t),u(t),t\right) \\ && \quad{} = k_{0} \left[ 1 \,-\, \frac{1}{2}\left|\frac{f_{s}(t)}{f_{y}}\right|^{N}\left( sgn(f_{s}(t)\dot{u}(t)) \,+\, 1\right)\right]\dot{u}(t) \end{array} $$
(10)

It is now possible to rewrite (1) more explicitly, introducing the functions g s and g d that have already been discussed.

$$\begin{array}{@{}rcl@{}} && m \ddot{u}(t) + c_{s} \dot{u}(t) + f_{s}(t) + f_{d}(t) = P(t)\\ && \dot{f}_{s}(t) = k_{s}\left[1-\frac{1}{2}\left|\frac{f_{s}(t)}{f_{y}}\right|^{N}\left( sgn(f_{s}(t)\dot{u}(t))+ 1\right)\right]\dot{u}(t)\\ && \dot{f}_{d}(t) = k_{d}\left[\dot{u}_{i}- \left( \frac{\left|f_{d}(t)\right|}{c_{d}}\right)^{\frac{1}{\alpha}}sgn(f_{d}(t))\right] \end{array} $$
(11)

It should be noted that the methodology discussed herein can accommodate any desired formulation for the functions g s and g d . Figure 3 represents schematically the single degree of freedom system that we will consider in the following development.

Fig. 3
figure 3

Single degree of freedom system subjected to transient excitation for demonstration purpose

2.3 Time-history analysis

The differential equations (11) are solved with an algorithm based on the Newmark-β integration scheme. In order to solve problem (1), we first discretize it in time:

$$\begin{array}{@{}rcl@{}} && m \ddot{u}_{i} + c_{s} \dot{u}_{i} + f_{s,i} + f_{d,i} = P_{i}\\ && \dot{f}_{s,i} = k_{s}\left[1-\frac{1}{2}\left|\frac{f_{s,i}}{f_{y}}\right|^{N}\left( sgn(f_{s,i}\dot{u}_{i})+ 1\right)\right]\dot{u}_{i}\\ && \dot{f}_{d,i} = k_{d}\left[\dot{u}_{i}- \left( \frac{\left|f_{d,i}\right|}{c_{d}}\right)^{\frac{1}{\alpha}}sgn(f_{d,i})\right]\\ && u_{0}= 0, \; \dot{u}_{0}= 0, \; f_{s,0}= 0, \; f_{d,0}= 0 \end{array} $$
(12)

for i = 1,…,N. Initially the problem is divided into N Δt identical time intervals. If in a specific time interval the algorithm does not achieve an equilibrium point with good approximation, the time interval is reduced into n sub-intervals. More details on this aspect will be provided later. In every time-step Δt i+ 1 = t i+ 1t i we rely on the constant acceleration method, which is a particular case of the more general Newmark-β method:

$$\begin{array}{@{}rcl@{}} \dot{u}_{i + 1} &=& \dot{u}_{i} + \frac{\Delta t_{i + 1} }{2} \left( \ddot{u}_{i + 1} + \ddot{u}_{i}\right)\\ u_{i + 1} &=& u_{i} + \dot{u}_{i}{\Delta} t_{i + 1} + \frac{({\Delta} t_{i + 1})^{2}}{4} \left( \ddot{u}_{i + 1} + \ddot{u}_{i}\right) \end{array} $$
(13)

In every time-step, the first order differential equations for f s (t) and f d (t) can be seen as two Cauchy problems with initial suitable conditions. Briefly, a Cauchy problem with initial conditions can be written as follows:

$$\left\{ \begin{array}{l} \dot{y} = f(y(t),t) \quad t\in\left[t_{0},t_{f}\right]\\ y(t_{0}) = y_{0} \end{array}\right. $$
(14)

The Cauchy problem can be approximated with the family of Runge-Kutta (RK) methods. These methods have the advantage of being one-step methods, which depend only on information related to time t i for approximating the problem at time t i+ 1. Therefore, they are naturally suited for being used in algorithms which rely on heterogeneous time discretizations. However, they achieve a good accuracy at the price of an increased number of function evaluations in each time-step, compared to multi-step methods (Quarteroni et al. 2007). For this reason, we will use a fourth-order RK method similarly to Kasai and Oohara (2001) and Oohara and Kasai (2002). This allows us to achieve a good compromise between accuracy of the approximation and complexity of the method. It should be noted that the complexity of the integration scheme directly affects the computational effort required in the sensitivity analysis, as it will be discussed in a later section.

The explicit four-stage RK method over the time step Δt i+ 1 = t i+ 1t i can be written as follows:

$$\begin{array}{@{}rcl@{}} y_{i + 1}&=&y_{i}+\frac{\Delta t_{i + 1}}{6}\left( K_{1}+ 2K_{2}+ 2K_{3}+K_{4}\right)\\ K_{1}&=&f(t_{i},y_{i})\\ K_{2}&=&f(t_{i}+\frac{\Delta t_{i + 1}}{2},y_{i}+\frac{\Delta t_{i + 1}}{2}K_{1})\\ K_{3}&=&f(t_{i}+\frac{\Delta t_{i + 1}}{2},y_{i}+\frac{\Delta t_{i + 1}}{2}K_{2})\\ K_{4}&=&f(t_{i + 1},y_{i}+{\Delta} t_{i + 1} K_{3}) \end{array} $$
(15)

The integration scheme (15) will be used for the approximation of both \(\dot {f}_{s,i}\) and \(\dot {f}_{d,i}\) in each time-step. Essentially, in every time-step we approximate u i , \(\dot {u}_{i}\), and \(\ddot {u}_{i}\) through the Newmark-β method. The resisting forces of the structural components and of the damper are approximated with the fourth order RK method presented in (15). The equilibrium in each point in time is achieved by means of an iterative procedure based on the Newton-Raphson method. In Table 1 we report the pseudo code for the integration scheme adopted in the time-history analysis, for a time-step t i t i+ 1. The algorithm was based on the one discussed in (Argyris and Mlejnek 1991), but it has been further enhanced to accommodate the nonlinear behavior of the systems herein considered, and the presence of nonlinear viscous dampers.

Table 1 Pseudo code for the algorithm used for the nonlinear time-history analysis

3 Adjoint sensitivity analysis

In the following section we calculate the sensitivity of a generic response functional h:

$$\begin{array}{@{}rcl@{}} &&h=f(u(x,t),\dot{u}(x,t),\ddot{u}(x,t),f_{s}(x,t),f_{d}(x,t),x,t), \\ &&\text{for}\;t \in [0,t_{f}] \end{array} $$
(16)

where x is a generic design variable. In particular we will rely on the discretize-then-differentiate adjoint variable method discussed in (Jensen et al. 2014). Therefore, from now on we will consider the discretized version of the problem at hand:

$$ h\,=\,f(u_{i},\dot{u}_{i},\ddot{u}_{i},f_{s,i},f_{d,i},x,t_{i}), \quad \text{for}\;i\,=\,1,\ldots,N $$
(17)

The goal is to calculate \(\frac {d\, h}{d\, x}\). To this end, we first define the augmented function \(\hat {h}\):

$$\begin{array}{@{}rcl@{}} \hat{h} &=& h +\sum\limits^{N}_{i = 0} R_{eq,i} \lambda_{i} + \sum\limits^{N}_{i = 1} R_{New1,i} \mu_{i} + \sum\limits^{N}_{i = 1} R_{New2,i} \nu_{i}\\ &&+ \sum\limits^{N}_{i = 1} R_{s,i} {\phi^{1}_{i}} + \sum\limits^{N}_{i = 1} R_{ks1,i}{\phi^{2}_{i}} + \sum\limits^{N}_{i = 1} R_{ks2,i} {\phi^{3}_{i}}\\ &&+ \sum\limits^{N}_{i = 1} R_{ks3,i} {\phi^{4}_{i}} + \sum\limits^{N}_{i = 1} R_{ks4,i} {\phi^{5}_{i}}\\ && + \sum\limits^{N}_{i = 1} R_{d,i}{\psi^{1}_{i}} + \sum\limits^{N}_{i = 1} R_{kd1,i}{\psi^{2}_{i}} + \sum\limits^{N}_{i = 1} R_{kd2,i} {\psi^{3}_{i}}\\ &&+ \sum\limits^{N}_{i = 1} R_{kd3,i} {\psi^{4}_{i}} + \sum\limits^{N}_{i = 1} R_{kd4,i} {\psi^{5}_{i}} \end{array} $$
(18)

where λ i , μ i , ν i , \({\phi ^{1}_{i}}\), \({\psi ^{1}_{i}}\), etc., are the adjoint variables and R e q,i , R N e w1,i , R N e w2,i , R s,i , R k s1,i , R d,i , R k d1,i , etc., are the equilibrium equations’ residuals in each time-step. These residuals should be equal to zero in order to satisfy the dynamic equilibrium of the system. It follows that \(\frac {d\, \hat {h}}{d\, x} =\frac {d\, h}{d\, x}\). In particular, we first consider the equation for the residual of the global equilibrium equation (12):

$$ R_{eq,i} = m \ddot{u}_{i} + c_{s} \dot{u}_{i} + f_{s,i} + f_{d,i} - P_{i} $$
(19)

We also consider the equations representing the residuals of the Newmark-β approximation (13):

$$\begin{array}{@{}rcl@{}} R_{New1,i} &=& -\dot{u}_{i} + \dot{u}_{i-1} + \frac{\Delta t_{i} }{2} \left( \ddot{u}_{i} + \ddot{u}_{i-1}\right)\\ R_{New2,i} &=& -u_{i} + u_{i-1} + \dot{u}_{i-1}{\Delta} t_{i} + \frac{({\Delta} t_{i})^{2}}{4} \left( \ddot{u}_{i} +\ddot{u}_{i-1}\right)\\ \end{array} $$
(20)

Next, we consider the residuals of the local equilibrium equations for the restoring force of the system approximated with the Runge-Kutta method (15):

$$\begin{array}{@{}rcl@{}} R_{s,i} \!&=&\! -f_{s,i} + f_{s,i-1} + \frac{\Delta t_{i}}{6}\left( K^{i-1}_{s1} + 2 K^{i-1}_{s2}\right.\\ && \left. +\, 2 K^{i-1}_{s3} + K^{i-1}_{s4}\right) \\ R_{ks1,i} \!&=&\! - K_{s1}^{i-1} + k_{s}\left[1-\frac{1}{2}\left|\frac{f_{s,i-1}}{f_{y}}\right|^{N}\right.\\ && \left. \times (sgn (f_{s,i-1}\dot{u}_{i-1})+ 1)\right]\dot{u}_{i-1} \\ R_{ks2,i} \!&=&\! - K_{s2}^{i-1} + k_{s}\left[1-\frac{1}{2}\left|\frac{\hat{f}^{1}_{s,i-1}}{f_{y}}\right|^{N}\right.\\ && \left. \times \left( sgn\left( \hat{f}^{1}_{s,i-1}\dot{u}_{i-\frac{1}{2}}\right) + 1\right)\vphantom{\frac{\hat{f}^{1}_{s,i-1}}{f_{y}}}\right]\dot{u}_{i-\frac{1}{2}}\\ R_{ks3,i} \!&=&\! - K_{s3}^{i-1} + k_{s}\left[1-\frac{1}{2}\left|\frac{\hat{f}^{2}_{s,i-1}}{f_{y}}\right|^{N}\right.\\ && \times \left. \left( sgn\left( \hat{f}^{2}_{s,i-1}\dot{u}_{i-\frac{1}{2}}\right) + 1\right)\vphantom{\frac{\hat{f}^{1}_{s,i-1}}{f_{y}}}\right]\dot{u}_{i-\frac{1}{2}}\\ R_{ks4,i} \!&=&\! - K_{s4}^{i-1} + k_{s}\left[1 - \frac{1}{2}\left|\frac{\hat{f}^{3}_{s,i-1}}{f_{y}}\right|^{N}\right.\\ && \left. \times \left( sgn\left( \hat{f}^{3}_{s,i-1}\dot{u}_{i}\right) + 1\right)\vphantom{\frac{\hat{f}^{1}_{s,i-1}}{f_{y}}}\right]\dot{u}_{i} \end{array} $$
(21)

where we defined:

$$\begin{array}{@{}rcl@{}} \hat{f}^{1}_{s,i-1} &=& f_{s,i-1}+{\Delta} t_{i}\frac{K_{s1}^{i-1}}{2}\\ \hat{f}^{2}_{s,i-1} &=& f_{s,i-1}+{\Delta} t_{i}\frac{K_{s2}^{i-1}}{2}\\ \hat{f}^{3}_{s,i-1} &=& f_{s,i-1}+{\Delta} t_{i}K_{s3}^{i-1}\\ \dot{u}_{i-\frac{1}{2}} &=& \frac{1}{2}\left( \dot{u}_{i}+\dot{u}_{i-1}\right) \end{array} $$
(22)

The last that remain to be considered are the residuals of the local equilibrium equations for the nonlinear damper approximated also with the Runge-Kutta method (15):

$$\begin{array}{@{}rcl@{}} R_{d,i} &=& - f_{d,i} + f_{d,i-1}\\ &&+ \frac{\Delta t_{i}}{6}\left( K^{i-1}_{d1} + 2 K^{i-1}_{d2}+ + 2 K^{i-1}_{d3} + K^{i-1}_{d4}\right)\\ R_{kd1,i} \!&=&\! - K_{d1}^{i-1} + k_{d}\left[\dot{u}_{i-1} \,-\, \left( \frac{\left|f_{d,i-1}\right|}{c_{d}}\right)^{\frac{1}{\alpha}} sgn(f_{d,i-1})\right]\\ R_{kd2,i} \!&=&\! - K_{d2}^{i-1} + k_{d}\left[\dot{u}_{i-\frac{1}{2}} \,-\, \left( \frac{\left|\hat{f}^{1}_{d,i-1}\right|}{c_{d}}\right)^{\!\!\frac{1}{\alpha}} \! sgn\!\left( \hat{f}^{1}_{d,i-1}\right)\!\right]\\ R_{kd3,i} \!&=&\! - K_{d3}^{i-1} \,+\, k_{d}\!\left[\!\dot{u}_{i-\frac{1}{2}} \,-\, \left( \frac{\left|\hat{f}^{2}_{d,i-1}\right|}{c_{d}}\right)^{\!\!\frac{1}{\alpha}} \! sgn \! \left( \hat{f}^{2}_{d,i-1}\right)\!\right]\\ R_{kd4,i} \!&=&\! - K_{d4}^{i-1} \,+\, k_{d}\!\left[\!\dot{u}_{i} \,-\, \left( \frac{\left|\hat{f}^{3}_{d,i-1}\right|}{c_{d}}\right)^{\frac{1}{\alpha}} \!sgn\!\left( \hat{f}^{3}_{d,i-1}\right)\!\right]\\ \end{array} $$
(23)

where we defined:

$$\begin{array}{@{}rcl@{}} \hat{f}^{1}_{d,i-1} &=& f_{d,i-1}+{\Delta} t_{i}\frac{K_{d1}^{i-1}}{2}\\ \hat{f}^{2}_{d,i-1} &=& f_{d,i-1}+{\Delta} t_{i}\frac{K_{d2}^{i-1}}{2}\\ \hat{f}^{3}_{d,i-1} &=& f_{d,i-1}+{\Delta} t_{i}K_{d3}^{i-1} \end{array} $$
(24)

It is now possible to formulate the full sensitivity of the function \(\hat {h}\) by differentiating the equations of the residuals (i.e. (19)–(23)) with respect to a generic variable x:

$$\begin{array}{@{}rcl@{}} \frac{d\, \hat{h}}{d\, x} \!&=&\! \sum\limits^{N}_{i = 1} \left( \frac{\partial h}{\partial u_{i}}\frac{d u_{i}}{d x}+\frac{\partial h}{d \dot{u}_{i}}\frac{d \dot{u}_{i}}{d x}+\frac{\partial h}{\partial \ddot{u}_{i}}\frac{d \ddot{u}_{i}}{d x} \frac{\partial h}{\partial f_{s,i}}\frac{d f_{s,i}}{d x}\right.\\&&\qquad\left.+\frac{\partial h}{\partial f_{d,i}}\frac{d f_{d,i}}{d x}+\frac{\partial h}{\partial x}\right)\\ &&+\sum\limits^{N}_{i = 0} \frac{dR_{eq,i}}{d x} \lambda_{i} \,+\, {\sum}^{N}_{i = 1} \frac{d R_{New1,i}}{d x} \mu_{i} \,+\, {\sum}^{N}_{i = 1} \frac{d R_{New2,i}}{d x} \nu_{i}\\ &&+ \sum\limits^{N}_{i = 1} \frac{d R_{s,i}}{d x} {\phi^{1}_{i}} \,+\, {\sum}^{N}_{i = 1} \frac{d R_{ks1,i}}{d x}{\phi^{2}_{i}} \,+\, {\sum}^{N}_{i = 1} \frac{d R_{ks2,i}}{d x} {\phi^{3}_{i}}\\ &&+ \sum\limits^{N}_{i = 1} \frac{d R_{ks3,i}}{d x} {\phi^{4}_{i}} \,+\, {\sum}^{N}_{i = 1} \frac{d R_{ks4,i}}{d x} {\phi^{5}_{i}}\\ &&+ \sum\limits^{N}_{i = 1} \frac{dR_{d,i}}{d x} {\psi^{1}_{i}} \,+\, {\sum}^{N}_{i = 1} \frac{d R_{kd1,i}}{d x}{\psi^{2}_{i}} \,+\, {\sum}^{N}_{i = 1} \frac{d R_{kd2,i}}{d x} {\psi^{3}_{i}}\\ &&+ \sum\limits^{N}_{i = 1} \frac{dR_{kd3,i}}{d x} {\psi^{4}_{i}} \,+\, {\sum}^{N}_{i = 1} \frac{d R_{kd4,i}}{d x} {\psi^{5}_{i}} \end{array} $$
(25)

It should be noted that the derivatives of the residuals are also calculated with the chain rule. For example:

$$\begin{array}{@{}rcl@{}} \frac{d R_{eq,i}}{d x} \!&=&\! \frac{\partial R_{eq,i}}{\partial \ddot{u}_{i}}\frac{d \ddot{u}_{i}}{d x}\,+\,\frac{\partial R_{eq,i}}{\partial \dot{u}_{i}}\frac{d \dot{u}_{i}}{d x}\,+\,\frac{\partial R_{eq,i}}{\partial f_{s,i}}\frac{d f_{s,i}}{d x}\\ &&+\frac{\partial R_{eq,i}}{\partial f_{d,i}}\frac{d f_{d,i}}{d x}\,+\,\frac{\partial R_{eq,i}}{\partial x};\\ \frac{d R_{s,i}}{dx} \!&=&\! \frac{\partial R_{s,i}}{\partial f_{s,i}}\frac{d f_{s,i}}{d x}\,+\,\frac{\partial R_{s,i}}{\partial f_{s,i-1}}\frac{d f_{s,i-1}}{d x} \,+\, \frac{\partial R_{s,i}}{\partial K^{i-1}_{s1}}\frac{d K^{i-1}_{s1}}{d x}\\ &&+\frac{\partial R_{s,i}}{\partial K^{i-1}_{s2}}\frac{d K^{i-1}_{s2}}{d x}\,+\,\frac{\partial R_{s,i}}{\partial K^{i-1}_{s3}}\frac{d K^{i-1}_{s3}}{d x}\\ & & +\frac{\partial R_{s,i}}{\partial K^{i-1}_{s4}}\frac{d K^{i-1}_{s4}}{d x} \,+\,\frac{\partial R_{s,i}}{\partial x} ;\\ \frac{d R_{d,i}}{dx} \!&=&\! \frac{\partial R_{d,i}}{\partial f_{d,i}}\frac{d f_{d,i}}{d x}\,+\,\frac{\partial R_{d,i}}{\partial f_{d,i-1}}\frac{d f_{d,i-1}}{d x} \,+\, \frac{\partial R_{d,i}}{\partial K^{i-1}_{d1}}\frac{d K^{i-1}_{d1}}{d x}\\ &&+\frac{\partial R_{d,i}}{\partial K^{i-1}_{d2}}\frac{d K^{i-1}_{d2}}{d x}\,+\,\frac{\partial R_{d,i}}{\partial K^{i-1}_{d3}}\frac{d K^{i-1}_{d3}}{d x}\\ && +\frac{\partial R_{d,i}}{\partial K^{i-1}_{d4}}\frac{d K^{i-1}_{d4}}{d x} +\frac{\partial R_{d,i}}{\partial x} \end{array} $$
(26)

where, for the sake of generality, we allowed each of the residuals to depend directly and indirectly on the independent design variable x. At this point we should also mention that the quantities \(K^{i-1}_{s,j}\) and \(K^{i-1}_{d,j}\), with j = 1,…,4, introduced by the RK approximations (15) of the forces f s,i and f d,i are treated as additional state variables. To avoid the calculation of the implicit derivatives of the state variables with respect to the design variables (e.g. \(\frac {d u_{i}}{d x}\), \(\frac {d \dot {u}_{i}}{d x}\), \(\frac {d \ddot {u}_{i}}{d x}\), \(\frac {d f_{s,i}}{d x}\), \(\frac {d f_{d,i}}{d x}\), \(\frac {d K^{i}_{s,1}}{d x}\), \(\frac {d K^{i}_{d,1}}{d x}\)), once (25) is differentiated all the terms multiplying these derivatives are collected and equated to zero. This requires the recollection of the terms in (25), considering the implicit derivatives \(\frac {d u_{i}}{d x}\), \(\frac {d \dot {u}_{i}}{d x}\), etc. unrelated. In this way it is possible to eliminate these unknown derivatives from the final formulation of the gradient \(\frac {d\hat {h}}{dx}\).

As a result of this procedure, we obtain a system of linear equations where the unknowns are the adjoint variables (e.g. λ i , μ i , ν i , \({\phi ^{1}_{i}}\), \({\psi ^{1}_{i}}\)) with terminal known conditions. More precisely, for each time step ii − 1we solve the following linear system:

$$ \mathbf{A}_{gr,i}\mathbf{z}_{gr,i} = \mathbf{b}_{gr,i} $$
(27)

where:

$$\begin{array}{@{}rcl@{}} \mathbf{A}_{gr,i} \!&=&\! \left[\begin{array}{ll}\mathbf{A}^{11}_{i} & \mathbf{A}^{12}_{i}\\ \mathbf{A}^{21}_{i} & \mathbf{A}^{22}_{i} \end{array}\right]\\ \mathbf{z}_{gr,i} \!&=&\! \left[ \begin{array}{ccccccccccccc}{\psi^{5}_{i}} {\kern-.3pt}&{\kern-.3pt} {\psi^{4}_{i}} {\kern-.3pt}&{\kern-.3pt} {\psi^{3}_{i}} {\kern-.3pt}&{\kern-.3pt} {\psi^{2}_{i}} {\kern-.3pt}&{\kern-.3pt} {\psi^{1}_{i}} {\kern-.3pt}&{\kern-.3pt} {\phi^{5}_{i}} {\kern-.3pt}&{\kern-.3pt} {\phi^{4}_{i}} {\kern-.3pt}&{\kern-.3pt} {\phi^{3}_{i}} {\kern-.3pt}&{\kern-.3pt} {\phi^{2}_{i}} {\kern-.3pt}&{\kern-.3pt} {\phi^{1}_{i}} {\kern-.3pt}&{\kern-.3pt} \nu_{i} {\kern-.3pt}&{\kern-.3pt} \mu_{i} {\kern-.3pt}&{\kern-.3pt} \lambda_{i} \end{array}\right]^{T}\\ \mathbf{b}_{gr,i} \!&=&\! \left[\begin{array}{ccc} \mathbf{b}^{1}_{i} & \mathbf{b}^{2}_{i} & \mathbf{b}^{3}_{i} \end{array}\right]^{T} \end{array} $$
(28)

The matrix A g r,i and the vector b g r,i have been presented in (28) divided into blocks. The details of each of these blocks are given in AAppendix. If we consider a generic system of N d o f degrees of freedom, with N d nonlinear viscous dampers, and N s elements at the level of which the nonlinear behavior of the resisting forces is defined, the matrix A g r,i has dimensions

$$(3 \times N_{dof} + 5 \times N_{s} + 5 \times N_{d} ) \times (3 \times N_{dof} + 5 \times N_{s} + 5 \times N_{d} )$$

The column vectors z g r,i and b g r,i have dimensions

$$(3\times N_{dof}+ 5 \times N_{s} + 5 \times N_{d}) \times 1$$

Herein, as we already mentioned, we consider a single degree of freedom system where N d o f = 1, N s = 1, and N d = 1 (see Fig. 3). Therefore, in (28) the matrix A g r,i has dimensions 13 × 13and the vector b g r,i 13 × 1. The matrix A g r,i in (27) may become very large in large scale problems, much larger than the number of degrees of freedom in the structural analysis. This, in first sight, may seem to lead to a computationally very expensive approach for sensitivity analysis. However, this is not the case. In fact, as the structural analysis problem is comprised of “global” and “local” state variables, the sensitivity analysis problem too is characterized by “global” and “local” adjoint variables. For example, λ i , μ i and ν i can be viewed as global adjoint variables, while all the others may be treated as local ones. Due to the structure of the equations and their linearity, some sets of the local adjoint variables may be solved locally as a function of the global ones. This is relatively easy as each set of the local equations is small. Then, the local adjoint variables could be substituted to the equations of the global ones. Thus, the system could be reduced to the size of the structural analysis problem while being linear. This is much more computationally cheap compared to the structural analysis. Thus, if the structural analysis problem is manageable from a computational point of view, then so is the sensitivity analysis. It should be remembered, that for the class of problems considered here, this is the computationally cheapest option.

The systems of linear equations (27) is solved backward starting from known terminal conditions for z g r (i.e. for z g r,N = z g r (t f )). Thus, the system of (27) is organized such that the vector b g r,i depends on z g r,i+ 1. The final conditions are written as follows:

$$ \mathbf{A}_{gr,N}\mathbf{z}_{gr,N} = \mathbf{b}_{gr,N} $$
(29)

The matrix A g r,N is essentially equal to A g r,i . The vector z g r,N contains the adjoint variables calculated in the final point in time t N . The vector b g r,N has less non zero entries than b g r,i , since the vector entries with subscript N + 1 do not exist. With reference to (28), the blocks of b g r,N are written as follows:

$$ \mathbf{b}^{1}_{N} = \left[\begin{array}{c} 0\\ 0\\ 0\\ 0\\ -\frac{\partial h}{\partial f_{d,N}}\\ \end{array}\right],\; \mathbf{b}^{2}_{N} = \left[\begin{array}{c} 0\\ 0\\ 0\\ 0\\ -\frac{\partial h}{\partial f_{s,N}} \end{array}\right], \mathbf{b}^{3}_{N} = \left[\begin{array}{c} - \frac{\partial h}{\partial \ddot{u}_{N}}\\ \\ - \frac{\partial h}{\partial \dot{u}_{N}}\\ \\ -\frac{\partial h}{\partial u_{N}}\\ \end{array}\right] $$
(30)

The adjoint sensitivity analysis starts from (29), to then continue by solving sequentially the system of equations (27) for i : N − 1 → 1. Once the adjoint variables z g r,i have been calculated for each discrete point in time t i it is possible to calculate the sensitivity of the functional h:

$$\begin{array}{@{}rcl@{}} \frac{d h}{d x}\!&=&\!\frac{d \hat{h}}{d x} \,=\, \sum\limits_{i = 1}^{N} \mathcal{A}_{i}\mathbf{z}_{gr,i}\\ &=&\!\sum\limits_{i = 1}^{N}\! \left\{ \left[\frac{dk_{s}}{d x}\mathcal{M}(f_{s,i{\kern-.3pt}-{\kern-.3pt}1},\dot{u}_{i{\kern-.3pt}-{\kern-.3pt}1})\,+\, \frac{d f_{y}}{d x} \mathcal{N}(f_{s,i{\kern-.3pt}-{\kern-.3pt}1},\dot{u}_{i{\kern-.3pt}-{\kern-.3pt}1})\right]\!{\kern-.3pt}\phi^{2}_{i}\right.\\ &&\!+\left[\frac{dk_{s}}{dx}\mathcal{M}(\hat{f}^{1}_{s,i-1},\dot{u}_{i-\frac{1}{2}})\,+\,\frac{df_{y}}{d x}\mathcal{N}(\hat{f}^{1}_{s,i-1},\dot{u}_{i-\frac{1}{2}})\right]\phi^{3}_{i}\\ \end{array} $$
$$\begin{array}{@{}rcl@{}} &&\quad +\left[ \frac{d k_{s}}{d x}\mathcal{M}(\hat{f}^{2}_{s,i-1},\dot{u}_{i-\frac{1}{2}}) \,+\, \frac{df_{y}}{d x}\mathcal{N}(\hat{f}^{2}_{s,i-1},\dot{u}_{i-\frac{1}{2}})\right]\phi^{4}_{i}\\ &&\quad + \left[ \frac{dk_{s}}{d x}\mathcal{M}(\hat{f}^{3}_{s,i-1},\dot{u}_{i})\,+\,\frac{d f_{y}}{d x}\mathcal{N}(\hat{f}^{3}_{s,i-1},\dot{u}_{i})\right]\phi^{5}_{i} \\ &&\quad + \left[ \frac{dk_{d}}{d x}\mathcal{G}(f_{d,i-1},\dot{u}_{i-1}) \,+\, \frac{d c_{d}}{d x}\mathcal{H}(f_{d,i-1})k_{d} \right]\psi^{2}_{i}\\ &&\quad + \left[ \frac{dk_{d}}{d x}\mathcal{G}(\hat{f}^{1}_{d,i-1},\dot{u}_{i-\frac{1}{2}}) \,+\, \frac{dc_{d}}{d x}\mathcal{H}(\hat{f}^{1}_{d,i-1})k_{d} \right]\psi^{3}_{i}\\ &&\quad + \left[\frac{dk_{d}}{d x}\mathcal{G}(\hat{f}^{2}_{d,i-1},\dot{u}_{i-\frac{1}{2}}) \,+\, \frac{dc_{d}}{d x}\mathcal{H}(\hat{f}^{2}_{d,i-1})k_{d}\right]\psi^{4}_{i}\\ &&\quad \left.+\left[ \frac{dk_{d}}{d x}\mathcal{G}(\hat{f}^{3}_{d,i-1},\dot{u}_{i}) \,+\, \frac{dc_{d}}{d x}\mathcal{H}(\hat{f}^{3}_{d,i-1})k_{d}\right]\psi^{5}_{i}\right\} \end{array} $$
(31)

where:

$$\begin{array}{@{}rcl@{}} \mathcal{M}(x,y) \!&=&\! \left[1\,-\,\frac{1}{2} \left|\frac{x}{f_{y}}\right|^{N} \!\left( sgn(xy) \,+\, 1\right)\!\right]\!y\\ \mathcal{N}(x,y) \!&=&\! 0.5 N k_{s} x \frac{1}{{f_{y}^{2}}} sgn\!\left( {\kern-.5pt}\frac{x}{f_{y}}{\kern-.5pt}\right)\! \left|\frac{x}{f_{y}}\right|^{N-1}\! ({\kern-.3pt}sgn{\kern-.3pt}({\kern-.3pt} x y {\kern-.3pt})\,+\,1) {\kern-.3pt}y {\kern-.3pt};\\ \mathcal{G}(x,y) \!&=&\! y \,-\, \left( \frac{\left|x\right|}{c_{d}} \right)^{\frac{1}{\alpha}}\!sgn(x) \\ \mathcal{H}(x) \!&=&\! \frac{1}{\alpha} c_{d}^{-\left( \frac{1}{\alpha}+ 1\right)} \left|x\right|^{\frac{1}{\alpha}} sgn\left( x\right) \end{array} $$
(32)

In (31), it is assumed that the properties of the spring (i.e. k s , and f y ) and of the viscous damper (i.e. c d , and k d ) are formulated explicitly in terms of the design variable x. The mass m, and the inherent damping c s , on the contrary, are assumed constant and not dependent on the design variable x. This is an approximation that relies on the assumption that a variation of the variable Δx will not affect significantly the mass and the inherent damping of the system.

Table 2 contains the pseudo code for the adjoint sensitivity analysis.

Table 2 Pseudo code for the adjoint sensitivity analysis

In the following section we will show how the adjoint sensitivity analysis discussed in this section can be used in order to optimize particular dynamic systems.

4 Applications

The adjoint sensitivity analysis discussed in Section 3 can be generalized to the case of multi-degree-of-freedom systems with no particular additional effort, and it opens up new possibilities for optimizing complex dynamic systems equipped with nonlinear viscous dampers. In this section we present and discuss two different illustrative numerical applications. In both cases we apply the adjoint sensitivity analysis discussed previously. The gradients calculated with the adjoint sensitivity analysis were verified by comparing them successfully with the gradients calculated with the finite difference method in both applications. The MATLAB code for the sensitivity analysis considered in the first application, and its verification with the finite difference method is provided as “Supplementary Material”. The first system considered is a planar frame with two degrees of freedom. The structure is subject to a ground motion acceleration, which represents a realistic seismic excitation. The goal is to design the added damping system to reduce the peak displacement in time of the structure. It can be seen as a seismic retrofitting problem for a structure with nonlinear behavior equipped with nonlinear fluid viscous dampers. In the second application we consider a quarter-car suspension system. The suspension is made of a linear spring and a nonlinear damper in parallel. In this case the spring is expected to remain in the linear range. The design extends to both the spring and the viscous damper composing the suspension system. The system is subject to a sinusoidal excitation representing the road irregularity.

4.1 Two degrees of freedom planar frame

The first example consists of a planar shear frame with two degrees of freedom, and subject to a ground acceleration as shown in Fig. 4. In particular, we consider the first 20 seconds of the acceleration record L A02 from the L A10% in 50 years ensemble (National Information Service for Earthquake Engineering - University of California Berkeley 2013). Figure 5 shows the ground acceleration record considered over time. Due to the ground acceleration the structure is expected to experience significant displacements, and in particular inter-story drifts (i.e. relative displacements between contiguous stories). In this case, the inter-story drifts are:

$$ d_{1}(t)=u_{1}(t); \quad d_{2}(t)=u_{2}(t)-u_{1}(t) $$
(33)

and they are collected in the vector d(t). Inter-story drifts are a measure of both structural and non-structural damage in structures subject to earthquakes (Charmpis et al. 2012). Hence, in this example the goal is to reduce the deformation demand on the structure by distributing and sizing up to two nonlinear fluid viscous dampers. The mass matrix and the initial stiffness vector of the system are:

$$ \mathbf{M} = \left[\begin{array}{cc} 0.0250 & 0 \\ 0 & 0.0250 \end{array}\right] 10^{3}ton ,\; \mathbf{k}_{s0} = \left[\begin{array}{c} 37.5 \\ 25 \end{array}\right] \frac{kN}{mm} $$
(34)

The nonlinear behavior of the structure is defined at the element level, as discussed in Section 2.2. In particular, for each column we consider an elastic-perfectly plastic behavior defined in terms of shear forces and relative horizontal displacement between the columns ends. The initial stiffness for the columns of the first and second floor is defined in the stiffness vector of (34). Each entry of the vector k s0is the sum of the stiffening contributions of the two columns of each story. Similarly, the yielding forces for the columns of the first and second story of the structure are defined in the vector f y :

$$ \mathbf{f}_{y} = \left[\begin{array}{l} 169 \\ 107 \end{array}\right] kN $$
(35)

We assume 5% of critical damping for the two modes of the structure to construct the Rayleigh damping matrix of the structure (Chopra 2011):

$$ \mathbf{C}_{s} = \left[\begin{array}{cc} 0.1207 & -0.0324 \\ -0.0324 & 0.0721 \end{array}\right] \frac{kNs}{mm} $$
(36)

This matrix is then considered constant throughout the optimization. We consider an aggregated constraint of the peak inter-story drifts in time. To this end, we first evaluate the maximum value in time of each inter-story drift with a differentiable approximation of the maxfunction:

$$ \tilde{\mathbf{d}}_{c}=\left( \frac{1}{t_{f}}{\int}^{t_{f}}_{0}\left( d^{-1}_{allow}\mathcal{D}(\mathbf{d}(t))\right)^{r}dt\right)^{\frac{1}{r}} \mathbf{1} $$
(37)

where t f is the final time, and \(\mathcal {D}(\cdot )\) is an operator that transforms a vector into a diagonal matrix, and a diagonal matrix into a vector (similarly to the diag(⋅)MATLAB function). In (37) the inter-story drifts have been normalized by the allowable value d a l l o w . The maximum allowable inter-story drift is set to d a l l o w = 9 m m. For high values of the parameter r, (37) approximates the maximum value in time of the normalized inter-story drifts. Numerically, (37) is calculated as follows:

$$ \tilde{\mathbf{d}}_{c}=\left( \frac{1}{t_{f}} {\sum}^{N}_{i = 1}w_{i}\left( d^{-1}_{allow}\mathcal{D}(\mathbf{d}_{i})\right)^{r}\right)^{\frac{1}{r}} \mathbf{1} $$
(38)

where \(w_{1}=\frac {\Delta t_{1}}{2}\), \(w_{N}=\frac {\Delta t_{N}}{2}\), and \(w_{i}=\frac {\Delta t_{i}+{\Delta } t_{i + 1}}{2}\). Subsequently, we aggregate the two normalized peak drifts:

$$ \tilde{d}_{c}=\frac{\mathbf{1}^{T}\mathcal{D}(\tilde{\mathbf{d}}_{c})^{q + 1}\mathbf{1}}{\mathbf{1}^{T}\mathcal{D}(\tilde{\mathbf{d}}_{c})^{q}\mathbf{1}} $$
(39)

Equation (39) for high values of the parameter q approximates the maximum value of the two entries of the vector \(\tilde {\mathbf {d}}_{c}\). It should be noted that both r and q are even numbers. We consider an exponent α for the viscous dampers equal to 0.35, and a fixed ratio between the damping coefficient and the stiffness coefficient of each viscous damper: ρ = k d /c d . The coefficient ρ in this example is set to 1.1042. For more information regarding the tuning procedure adopted for the definition of ρ the reader is referred to (Pollini et al. 2017). As a result, the design variables of the problem are c d1 and c d2 for a given exponent α and ratio ρ. The two damping coefficients are defined as the product of a reference damping coefficient \(\bar {c}_{d}\) and a scaling variable x i ∈ [0,1]: \(c_{di}=x_{i}\bar {c}_{d}\), for i = 1,2. The reference damping coefficient represents the maximum allowed value of damping, and it is defined a priori. In this example is set to \(\bar {c}_{d} = 100\, [kN(s/mm)^{\alpha }] \). As we already mentioned, the properties of the structure are given, and the added viscous dampers are designed in order to satisfy a constraint on performance. Similarly to what is done in more traditional problems of structural optimization where structural weight or volume are minimized (e.g. truss optimization), here we are designing the smallest added damping system required. The dampers are characterized by their damping coefficient, therefore the most natural objective cost function would be the sum of the dampers’ damping coefficients. Thus, the objective cost function minimized is the sum of the two damping coefficients of the two fluid viscous dampers that could be potentially placed in the structure if needed. The final optimization problem formulation is presented in (40):

$$\begin{array}{@{}rcl@{}} \min_{\textbf{x}} &&J=c_{d1}+c_{d2}\\ \text{s.\ t.:}&&\tilde{d}_{c}=\frac{\mathbf{1}^{T}\mathcal{D}(\tilde{\mathbf{d}}_{c})^{q + 1}\mathbf{1}}{\mathbf{1}^{T}\mathcal{D}(\tilde{\mathbf{d}}_{c})^{q}\mathbf{1}}\leq 1 \\ &&0 \leq x_{1,2}\leq 1\\ \text{with:} && \mathbf{M} \ddot{\mathbf{u}}(t) + \mathbf{C}_{s} \dot{\mathbf{u}}(t) + \mathbf{T}^{T}\mathbf{f}_{s}(t) + \mathbf{T}^{T}\mathbf{f}_{d}(t)sin (\beta) \!\\&&\qquad\qquad\qquad\qquad\qquad\qquad\quad = - \mathbf{M} \mathbf{e}a_{g}(t)\\ && \dot{\mathbf{f}}_{s}(t)=\mathcal{D}(\mathbf{k}_{s0})\left[\textbf{I}-\frac{1}{2}\mathcal{D}\left( \left|\mathcal{D}(\mathbf{f}_{y})^{-1}\mathbf{f}_{s}(t)\right|^{N}\right)\right.\\ && \qquad \qquad \quad\left. \mathcal{D}\left( sign(\mathcal{D}(\mathbf{f}_{s}(t))\mathbf{T}\dot{\mathbf{u}}(t))+\mathbf{1}\right)\vphantom{\frac{1}{2}}\right]\mathbf{T}\dot{\mathbf{u}}(t)\\ && \dot{\mathbf{f}}_{d}(t)=\mathcal{D}\left( \mathbf{k}_{d}\right)\left[\mathbf{T}\dot{\mathbf{u}}(t)- \left( \mathcal{D}\left( \mathbf{c}_{d}\right)^{-1}\mathcal{D}\left( \left|\mathbf{f}_{d}(t)\right|\right)\right)^{\frac{1}{\alpha}}\right.\\ && \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad\left. sgn(\mathbf{f}_{d}(t))\vphantom{\left( \mathcal{D}\left( \mathbf{c}_{d}\right)^{-1}\mathcal{D}\left( \left|\mathbf{f}_{d}(t)\right|\right)\right)^{\frac{1}{\alpha}}}\right]\\ && \mathbf{u}_{0}= 0, \; \dot{\mathbf{u}}_{0}= 0, \; \mathbf{f}_{s,0}= 0, \; \mathbf{f}_{d,0}= 0\\ && c_{di} = c_{d0} + x_{i}\bar{c}_{d}, \; k_{di} = \rho c_{di}, \; i = 1, 2\\ && \tilde{\mathbf{d}}_{c}=\left( \frac{1}{t_{f}}{\int}^{t_{f}}_{0}\left( d^{-1}_{allow}\mathcal{D}(\mathbf{d}(t))\right)^{r}dt\right)^{\frac{1}{r}} \mathbf{1} \end{array} $$
(40)

where T is a transformation matrix from local degrees of freedom to global ones, and I is the identity matrix. As already mentioned, we attach to this article the MATLAB code for the sensitivity analysis of the constraint on \(\tilde {d}_{c}\), and its verification with the finite difference method. Problem (40) has been solved with a Sequential Linear Programming approach (SLP), where in every iteration the sub-problems were solved with the Gurobi Optimizer solver for Linear Programming problems (Gurobi Optimization Inc. 2016). In every iteration five linearized constraints were considered: the linearized aggregated constraint corresponding to the current iteration point and the linearized constraints corresponding to the previous four iterations. Due to the non-convexity of the problem, it may happen that in a certain iteration one or more linearized constraints are active even though the current point strictly falls into the feasible domain. This issue was already discussed in (Lavan and Levy 2006b), and it is shown in Fig. 2 of the same reference. These constraints may lead to too conservative solutions. Therefore they are removed and disregarded in the following iterations. Moving limits were also considered with respect to the design variables x 1 and x 2. In particular, we considered moving limits with a range of ± 0.025with respect to each current iteration point. Last, the parameters r and q presented in (37) and (39) are initially set to 1000, and progressively increased through the iterations by steps of 50.

Fig. 4
figure 4

Two degrees of freedom system with nonlinear fluid viscous dampers considered in Section 4.1

Fig. 5
figure 5

Ground acceleration record LA02 considered in Section 4.1

The starting point for the optimization analysis was the maximum damping solution, with both c d1 and c d2 equal to 100 [k N(s/m m)α] (i.e. x 1 = 1, x 2 = 1). The optimization analysis converged after 36 iterations in MATLAB. The details regarding the final optimized design solution are listed in Table 3. In Fig. 6 we plot the contour of the objective function and of the aggregated constraint, and the optimization path followed by the algorithm. Each blue circle represents an optimal point identified in each iteration. The black circle represents the final solution. From the plot it is also possible to notice the high degree of non-convexity of the problem at hand. Nevertheless, the algorithm adopted in this application was able to identify what graphically seems to be a final solution resembling the optimal solution of the problem. From Table 3 it possible to observe that the final solution is characterized by a small constraint violation. The aggregated inter-story dirift constraint is highly non-convex and progressively approximated by (38) and (39). These two approximations of the max function improve their accuracy through the iterations according to the prescribed continuation scheme. Thus, the non-convex constraint is hard to enforce due the approximation adopted. Additionally, the optimal solution seats in a corner of the feasible domain. Therefore, as the algorithm converges towards this corner, it becomes more complex to enforce the approximated aggregated constraint through sequential linearizations. As a result, the final solution is identified accepting a negligible (from an engineering point of view) constraint violation. The values of the aggregated constraint and objective function for each iteration point are plotted in Fig. 7. In Fig. 8, we show the response of the structure with the optimized damping distribution. In particular, the first plot shows the response in terms of global coordinates u 1 and u 2. The second plot shows the response in terms of dampers’ local coordinates (i.e. inter-story drifts) d 1 and d 2.

Fig. 6
figure 6

Contour of the objective function (blue) and of the aggregated constraint (red) considered in Section 4.1. Each blue circle represent the optimal point for each sub-linear programming problem. The black circle represents the final optimized solution

Fig. 7
figure 7

Values of the aggregated constraint and objective function over the iterations

Fig. 8
figure 8

Structural response of the optimized structure. The first plot shows the displacements u 1(blue) and u 2(red) over time. The second plot shows the inter-story drifts d 1 = u 1(blue) and d 2 = u 2u 1(red) over time. The dashed line represents the maximum allowable inter-story drift (i.e. 9 mm)

Table 3 Final solution of the first example application

4.2 Quarter-car with passive suspension system

The second application that we discuss consists of the design of a quarter-car suspension system equipped with a nonlinear fluid viscous damper. This particular application was inspired by the numerical examples discussed in (Georgiou et al. 2007), where the authors formulated and solved with genetic algorithms a multi-objective optimization problem for the design of passive or semi-active suspension systems. In what follows, the quarter-car is modeled as a two degrees of freedom system, similarly to the previous application. The system is subject to a sinusoidal road excitation z g (t) = A s i n(ω t), with A = 50m m, ω = 10r a d/s e c, and 0 ≤ t ≤ 1.25 s e c. This value of the forcing frequency was chosen because it is close to one of the undamped natural frequencies of the linear system. Essentially, this excitation mimics the dynamic load felt by a car driving over a road irregularity of amplitude 5 c m and length 4.36 m, with a speed of 50 k m/h. The associated ground acceleration considered in the equations of motion is \(\ddot {z}_{g}(t) = - A\, \omega ^{2}\,sin(\omega t)\). In Fig. 9 we show the dynamic system considered. In this case the first mass represents the unsprung mass of the wheel, and the second mass accounts for a quarter of the total sprung car mass. The coefficients k s1 and c 1 represent the stiffness and the damping of the wheel. They both define linear behaviors, and they are considered fixed and not involved in the design. Their values are set to k s1 = 200 k N/m and c 1 = 7 N s/m. The suspension system is characterized by a linear spring and a nonlinear fluid viscous damper. These two elements will be designed with an optimization-based approach. The spring is defined by the stiffness coefficient k s2, initially set to 15 N/m m. The damper is defined by the stiffness coefficient k d , the damping coefficient c d , and the exponent α. The mass matrix, the damping matrix, and the initial stiffness matrix are:

$$\begin{array}{@{}rcl@{}} \mathbf{M} &=& \left[\begin{array}{cc} 0.06 & 0 \\ 0 & 0.375 \end{array}\right] ton ,\; \mathbf{C}_{s} = \left[\begin{array}{cc} 0.007 & 0 \\ 0 & 0 \end{array}\right] \frac{Ns}{mm}\\ \mathbf{K}_{s} &=& \left[\begin{array}{cc} 207.58 & -7.58 \\ -7.58 & 7.58 \end{array}\right] \frac{N}{mm} \end{array} $$
(41)
Fig. 9
figure 9

Quarter-car with nonlinear passive suspension considered in Section 4.2

As in Section 4.1, also in this case we consider a fixed ratio ρ between the damping coefficient and the stiffness coefficient of the damper. In particular, in this application we considered a ratio ρ equal to 1.4519. For the calculation of ρ we followed the same tuning procedure discussed in Pollini et al. (2017), considering the linear system defined by the mass and stiffness matrices presented in (41). The exponent α in this case was set to 0.5. Therefore, the design variable related to the damper is the damping coefficient c d for a given ratio ρ and exponent α. For convenience, from a numerical point of view, the two design variables are reformulated as follows:

$$ c_{d} = x_{1}\bar{c}_{d},\; k_{s2} = x_{2}\bar{k}_{s} $$
(42)

where \(\bar {c}_{d}\) and \(\bar {k}_{s}\) are reference damping and stiffness coefficients defined a priori, and x 1,2 ∈ [0,1]. In this example we considered \(\bar {c}_{d}= 150\) N(s/m m)α and \(\bar {k}_{s}= 15\) N/m m. The goal of this problem is to design a suspension system that minimizes the peak acceleration in time of the mass m 2 while respecting a constraint on the peak stroke of the suspension. The peak acceleration of the second mass is a parameter related to the comfort of the occupants of the car. Therefore, we want to achieve the best level of comfort by minimizing the peak acceleration \(\ddot {u}_{2,max} = \max _{t} |\ddot {u}_{2}(t)|\). We calculate the peak acceleration through a differentiable approximation of the maxfunction:

$$ \ddot{u}_{2,max}= \left( \frac{1}{t_{f}} {\int}^{t_{f}}_{0} \left( \ddot{u}_{2}(t)\right)^{r}dt\right)^{\frac{1}{r}} $$
(43)

where r is a high even number. At the same time, we consider a constraint on the peak suspension stroke, or suspension travel. The peak stroke is calculated also with a differentiable formulation:

$$ \tilde{d}_{c}=\left( \frac{1}{t_{f}}{\int}^{t_{f}}_{0}\left( \frac{u_{2}(t)-u_{1}(t)}{d_{allow}}\right)^{r}dt\right)^{\frac{1}{r}} $$
(44)

where the maximum allowed stroke was set to d a l l o w = 50m m. Both (43) and (44) have been calculated similarly to (37). The final optimization problem is presented in (45):

$$\begin{array}{@{}rcl@{}} \min_{\mathbf{x}} &&J = \left( \frac{1}{t_{f}} {\int}^{t_{f}}_{0} \left( \ddot{u}_{2}(t)\right)^{r}dt\right)^{\frac{1}{r}}\\ \text{s.\ t.:}&&\tilde{d}_{c}\leq 1\\ &&0 \leq x_{1,2}\leq 1\\ \text{with:} && \mathbf{M} \ddot{\mathbf{u}}(t) + \mathbf{C}_{s} \dot{\mathbf{u}}(t) + \mathbf{K}_{s} \mathbf{u}(t) + \mathbf{T}^{T}\mathbf{f}_{d}(t) = - \mathbf{M} \mathbf{e}\ddot{z}_{g}(t)\\ & & \dot{\mathbf{f}}_{d}(t)=\mathcal{D}\left( \mathbf{k}_{d}\right)\left[\mathbf{T}\dot{\mathbf{u}}(t)- \left( \mathcal{D}\left( \mathbf{c}_{d}\right)^{-1}\right.\right.\\ &&\left.\left. \qquad \qquad \qquad \qquad \mathcal{D}\left( \left|\mathbf{f}_{d}(t)\right|\right)\right)^{\frac{1}{\alpha}}sgn(\mathbf{f}_{d}(t))\right]\\ && \mathbf{u}_{0}= 0, \; \dot{\mathbf{u}}_{0}= 0, \; \mathbf{f}_{d,0}= 0\\ && c_{d} = x_{1}\bar{c}_{d}, k_{d} = \rho c_{d}\; \\ && k_{s2} = x_{2}\bar{k}_{s}\\ && \tilde{d}_{c}=\left( \frac{1}{t_{f}}{\int}^{t_{f}}_{0}\left( \frac{u_{2}(t)-u_{1}(t)}{d_{allow}}\right)^{r}dt\right)^{\frac{1}{r}} \end{array} $$
(45)

Problem (45) has been solved with the Method of Moving Asymptotes (MMA) (Svanberg 1987). The MMA algorithm, in fact, proved to be more effective for this particular optimization problem in converging smoothly towards the final optimized solution. Moreover, with this example we want to show that the sensitivity analysis discussed herein can be applied to different types of dynamic systems. We considered the same moving limits as in the previous application, and the same setting for the parameter r.

The variables x 1and x 2were initially set to one. As a consequence, the associated physical design variables initially were: c d = 150N(s/m m)α, and k s2 = 15N/m m. The optimization process converged after 24 iterations in MATLAB. The final results of the analysis are presented in Table 4. Figure 10 shows the contour of the objective function and of the constraint. It also shows the optimization path followed by the optimizer. Also in this case each blue circle represents optimal points for each subsequent convex approximation of the problem at hand. The black circle highlights the final design solution. The values of the constraint and of the objective function over the iterations are plotted in Fig. 11. The response of the optimized system is shown in Figs. 12 and 13. In particular, Fig. 12 shows the acceleration response of the sprung mass m 2 in time, and the stroke of the suspensions system d(t) = u 2(t) − u 1(t)in time. Figure 13 shows the response of the damper in terms of force-displacement and force-velocity.

Fig. 10
figure 10

Contour of the objective function (blue) and of the aggregated constraint (red) considered in Section 4.2. Each blue circle represent the optimal point for each sub-convex programming problem. The black circle represents the final optimized solution

Fig. 11
figure 11

Value of the aggregated constraint and objective function over the iterations

Fig. 12
figure 12

Acceleration and drift response of the sprung mass in the optimized system. The dashed line represents the maximum allowable stroke (i.e. 50 mm)

Fig. 13
figure 13

Force-displacement and force-velocity response histories of the viscous damper in the optimized system

Table 4 Final solution of the second example application

5 Conclusions

In this paper we discussed the adjoint sensitivity analysis and optimization for nonlinear dynamic systems coupled with nonlinear fluid viscous dampers. The dampers are modeled with the Maxwell’s model for visco-elasticity. It is thus possible to account for the stiffening and damping contributions of the device. The systems are subject to transient excitations, and their response is calculated with the Newmark-β method. In particular, the equilibrium in each time-step is iteratively achieved by means of the Newton-Raphson and Runge-Kutta methods. The heart of the discussion of this paper focuses on the adjoint sensitivity analysis of these systems, and its application to two different design cases. The sensitivity of a generic response function is in fact consistently calculated with detail through the discretize-then-differentiate version of the adjoint variable method. The generic framework is then applied to the optimization-based design of an added damping system for seismic retrofitting, and to the optimization-based design of a quarter-car suspension system. Both applications show the importance of the adjoint sensitivity analysis discussed herein in the context of optimization-based design of hysteretic dynamic systems with nonlinear viscous dampers. The results presented could be extended and applied to different design cases, where we expect the methodology discussed here to promote the use of computationally efficient design procedures based on optimization.

Table 5 Block \(\mathbf {A}^{11}_{i}\) of the partitioned matrix A g r,i