Calculation of Vibrations in Structures
Calculation of Vibrations in Structures
Calculation of Vibrations in Structures
LINNEA FAGERSTRÖM
PHILIP LINDORSSON
Master’s thesis in the Master’s Programme Structural Engineering and Building Technology
LINNEA FAGERSTRÖM
PHILIP LINDORSSON
Cover:
Traffic flow causing ground vibration, transferred to building.
Chalmers Reproservice
Gothenburg, Sweden 2017
Calculation of Vibrations in Structures in the Early Design Phase
Prediction of comfort disturbing vibrations in buildings
Master’s thesis in the Master’s Programme Structural Engineering and Building Technology
LINNEA FAGERSTRÖM
PHILIP LINDORSSON
Department of Architecture and Civil Engineering
Division of Structural Engineering
Chalmers University of Technology
A BSTRACT
Performing dynamic analyses to predict vibrations in buildings, due to e.g. nearby traffic, may require
advanced calculations. These type of analyses are therefore seldom made if the purpose only is
to study the response with regard to vibrational comfort. This master’s thesis aims to investigate
how the dynamic response of buildings can be analysed in a simplified manner. In cooperation
with ÅF-Infrastructure AB, business area Buildings, a calculation program, using methods common
in earthquake engineering in combination with comfort weighting of vibrations, is developed in
Visual Basic for Applications (VBA). Analyses are performed on simple structures and the results
are compared to results from the commercial FE program ADINA.
The study shows that when comfort weighting is not considered, the developed program generates
results with a maximum of 10% error for the relative response and about 35% error for the total
response. Further studies are required in order to find a more reliable approach to include the ground
motion and hence reduce the error for the total response.
For the comfort weighted response, the error is between 2 and 87%. The difference in absolute values
is however considered as small. It should be noted that the approach of comfort weighting that is
used in the study is not an established method but an interpretation developed with help from Sound
& Vibrations at ÅF-Infrastructure AB. Further studies are required in order to find a more reliable
method.
Even though the developed program generates results that sometimes differ significantly to results
from advanced analyses, it is concluded that the program indicates whether the dynamic responses
are potentially critical or not.
Keywords: structural dynamics, vibrations, comfort weighting, response spectrum analysis, time
history analysis, ground motion, Newmark
SAMMANFATTNING
Att utföra dynamiska analyser för att uppskatta vibrationer i byggnader, från exempelvis närliggande
trafik, kan komma att kräva avancerade beräkningar. Dessa typer av analyser utförs därför sällan
om syftet bara är att studera responsen med avseende på komfort. Detta examensarbete syftat till att
undersöka hur den dynamiska responsen av byggnader kan analyseras på ett enklare sätt. I samarbete
med ÅF-Infrastructure AB, affärsområde Buildings, har ett beräkningsprogram i Visual Basic for
Applications (VBA) utvecklats. Programmet använder sig av tekniker vanliga vid jordbävningsberäk-
ningar tillsammans med komfortvägning av vibrationer. Analyser på enkla strukturer är utförda och
resultaten är jämförda med resultat från det kommersiella FE-programmet ADINA.
Studien visar att för den icke komfortvägda responsen ger beräkningsprogrammet en avvikelse på
maximalt 10% för den relativa responsen och cirka 35% för den total responsen. Vidare studier krävs
för att hitta ett mer tillförlitligt tillvägagångssätt för att inkludera markrörelsen och därmed minska
felmarginalen för den total responsen.
För den komfortvägda responsen är avvikelsen mellan 2 och 87%. Skillnaden i absoluta tal anses
däremot vara liten. Det bör poängteras att tillvägagångssättet för komfortvägning som används i den
här studien inte är någon vedertagen metod utan snarare en tolkning som tagits fram med hjälp av
Sound & Vibrations på ÅF-Infrastructure AB. Vidare studier krävs för att hitta en mer tillförlitlig
metod.
Trots att det utvecklade programmet ger resultat som ibland skiljer sig avsevärt mot resultat från
avancerade analyser kan slutsatsen dras att programmet ger en fingervisning om den dynamiska
responsen är potentiellt kritisk eller inte.
Abstract i
Sammanfattning ii
Preface ix
Nomenclature xi
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 General aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.4 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5 Outline of the report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Theory 4
2.1 Introduction to vibrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.1 Natural vibrational modes . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.2 Vibrations in buildings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.2.1 Relative and total response . . . . . . . . . . . . . . . . . . . . 6
2.1.2.2 Common vibrational sources . . . . . . . . . . . . . . . . . . . 6
2.1.2.3 Acoustic perspective . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.2.4 Structural perspective . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.2.5 Regulations and guidelines . . . . . . . . . . . . . . . . . . . . 8
2.1.3 Comfort weighting of vibrations . . . . . . . . . . . . . . . . . . . . . . . 8
2.1.3.1 Purpose of comfort weighting . . . . . . . . . . . . . . . . . . . 9
2.1.3.2 General approach . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Fundamentals of structural dynamics . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.1 Basic equations, SDOF systems . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.2 Basic equations, MDOF systems . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.2.1 Natural frequencies of an undamped MDOF system . . . . . . . 14
2.2.2.2 Damping of MDOF systems . . . . . . . . . . . . . . . . . . . . 15
2.2.3 Integration methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3 Applications of structural dynamics . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3.1 Time history analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.3.2 Response spectrum analysis . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.3.3 Modal participation factor . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.4 Modal combination rules . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5 Discussion 61
5.1 Applications of VBA program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.2 Discussion of RSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.3 Discussion of comfort weighting . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.4 Simplifications and limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6 Final remarks 64
6.1 Summary of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.1.1 Response spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.1.2 Response spectrum analysis in VBA script and ADINA . . . . . . . . . . . 64
6.1.3 Response spectrum analysis compared to time history analysis . . . . . . . 64
6.1.4 Implementation of comfort weighting . . . . . . . . . . . . . . . . . . . . 65
6.1.5 Simple building model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.1.6 Analysis of simple MDOF system . . . . . . . . . . . . . . . . . . . . . . 65
6.1.7 Study of residential building . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.2 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
6.3 Further studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
References 69
List of Tables
2.1 Guildeline values for vibrations in buildings, from SS 460 48 61. . . . . . . . . . . 8
2.2 One-third-octave bands with corresponding frequency weighting factors. . . . . . . 11
3.1 Input data for response spectra of traffic load. . . . . . . . . . . . . . . . . . . . . 27
3.2 Beam properties for verification with RSA. . . . . . . . . . . . . . . . . . . . . . 33
3.3 Comparison of results from ADINA and VBA. . . . . . . . . . . . . . . . . . . . 33
3.4 Properties of the analysed beams, see Figure 3.7 for definitions. . . . . . . . . . . . 33
3.5 Comparison of adding different 𝛥𝑅 from Analysis 1 to Equation (3.3). . . . . . . . 38
3.6 Properties of the additional analysed beams. . . . . . . . . . . . . . . . . . . . . . 39
3.7 MPF multiplied with corresponding eigenvalue. . . . . . . . . . . . . . . . . . . . 40
3.8 Analysed structures, four columns on each level. . . . . . . . . . . . . . . . . . . . 49
3.9 Natural frequencies, Analysis 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
1.1 Background
In countries where natural hazards such as earthquakes luckily are quite rare, advanced dynamic
analyses of buildings are often considered superfluous. However, similar dynamic effects, in a lower
scale, might still be originating from other external loads, such as nearby heavy traffic. Whether
the demands are regarding capacity in the ultimate limit state (ULS) or regarding comfort in the
serviceability limit state (SLS), they need to be taken into account during the design process. Therefore,
it might be of interest to analyse not only the effects of static loads, but also the dynamic response of
a structure.
Today, performing dynamic analyses to predict future vibrations may require rather advanced calcula-
tions, using methods that are both time consuming and expensive. Therefore, these kinds of analyses
are seldom made if they only consider comfort, and hence there is a need for a more simplified
method. By combining structural dynamics with methods used by acousticians to weight signals
regarding comfort, it is possible to quickly approximate the structural response, or determine whether
a more thorough analysis is required or not.
This master’s thesis aims to investigate how the dynamical response of structures, in terms of vibrations
caused by nearby heavy traffic, can be analysed in a simplified manner. A simplified method to use
in the early design phase, for prediction of the behaviour due to dynamic loads, is developed and
evaluated. This method can be used to evaluate if a more thorough investigation is required. It can
also be used to make reviewing of advanced analyses more simple. The intention is that the simplified
approach will reduce the effort needed, and hence make dynamic analyses more frequently used
in the design of buildings. The method is also supposed to bridge the working areas of structural
engineers and acousticians in order to utilise expertise from both areas.
1.3 Method
A literature study is performed where the basics in structural dynamics are studied, such as solution
methods, time history analysis (THA) and response spectrum analysis (RSA). The information is
collected from scientific articles, technical reports and textbooks.
A numerical integration method is studied more thoroughly and a script in Visual Basic for Appli-
cations (VBA) is designed. From the script, response spectra showing the maximum accelerations,
velocities and displacements, are made. These are generated by studying the response of single
degree of freedom (SDOF) systems with various natural frequencies, exposed to a given ground
motion. The results are compared to, and verified with, response spectra created in the commercial
finite element (FE) program ADINA.
The VBA script is developed such that multi degree of freedom (MDOF) systems also can be analysed.
Methods for modal analyses are implemented in the script to translate the responses from the response
1.4 Limitations
The methods used for comfort weighting are not evaluated from an acousticians point of view, only
applied to structural engineering. Different methods are compared but the derivations are not studied.
The damping phenomena of a structure is complex and out of the scope of this report; it is therefore
only briefly explained and approximately used. Effects of damping are considered, but different
damping methods are not investigated or evaluated. In the analyses only modal damping is considered.
The analysed models are limited to simple systems, intended to represent the overall behavior of real
structures. The models consist of simple structures, like beams and frames, with varying boundary
conditions and loads. Only linear elastic material models are considered, and in those cases where
concrete structures are analysed the effect of cracking is disregarded.
Further, geotechnical aspects of vibrations and the effects of foundations, and its transfer of vibrations,
are not considered.
Chapter 2 is a theory chapter, introducing vibrations and describing some fundamentals of structural
dynamics. It covers basic concepts of vibrations, description of comfort weighting, the essential
equations of structural dynamics along with the distinction between RSA and THA. The theory
described here is used in the development of the calculation program and is referred to throughout
the report.
Chapter 3 describes the process of the development of the calculation program. Here, the various
analyses and verifications, leading to the final program, are presented. This chapter covers how the
response spectra are generated, modal analyses performed on simply supported beams, studies on
implementation of comfort weighting and lastly, studies on how to model a multi storey building.
Chapter 4 describes a previous study performed by ÅF-Infrastructure AB, with the purpose to predict
future vibrations in a residential building. A simplified model of the same building is analysed in the
developed program and the obtained results are compared to the previously obtained results.
When a system is displaced from its equilibrium state, it will react with internal forces to regain
equilibrium. Those internal forces will cause the system to move periodically, a movement commonly
referred to as a vibration (Britannica Academic, 2017). The vibrations that a system develop can be
either forced or free. Free vibrations arise when a system is dislocated from its equilibrium state.
The vibration will continue forever, as long as a damping restraint does not exist, and the system will
vibrate in its own natural frequency. The natural frequency is independent of the size of the load that
induced the dislocation of the system, whereas the amplitude of the vibration is affected by the size
of the inducing load.
A mass suspended from a spring is an easy way of illustrating free vibrations, see Figure 2.1. The
masses, that all have the mass 𝑚, will, if dislocated from their equilibrium state, start to move up and
down in the system’s natural frequency. The three systems in Figure 2.1 will have different natural
frequencies due to the different stiffness, 𝑘1 , 𝑘2 , 𝑘3 , of the springs.
For the systems in Figure 2.1, the mass will move up and down in a harmonic motion, which can be
expressed as:
𝑢(𝑡) = 𝜙 𝑐𝑜𝑠(𝜔𝑡 − 𝛼) (2.1)
where 𝑢(𝑡) is the vertical displacement dependent on the time 𝑡, 𝜙 is the amplitude of the motion, 𝜔
is the angular (natural) frequency of the system and 𝛼 is the phase shift.
As mentioned above, a free vibration will continue if the movement is not damped. When damped,
the amplitude of the vibration will decrease over time, as the damper absorbs the energy in the
system, e.g. due to frictional forces (Craig and Kurdila, 2006). A free vibration without damping is a
hypothetical case that never exists in reality.
Forced vibrations arise when a system is excited continuously by an external load. If the frequency
of the load approaches the natural frequency of the system, it will lead to resonance. Resonance will
make the amplitude of the motion grow, and even if damping exists in the system the movements can
become considerably large (Britannica Academic, 2017).
Structures that are more complex than a mass suspended from a spring, i.e. have more than one
degree of freedom (DOF), have possibilities to vibrate in several different ways, usually each will
have different natural frequencies. A way of vibrating is called a mode and a system will have as
many natural frequencies and modes as it has degrees of freedom (DOFs).
A simply supported beam will usually have several natural frequencies; 𝑓1 , 𝑓2 , ... , 𝑓𝑛 , where 𝑓1 is
the lowest. The value of the lowest natural frequency is dependent on the stiffness and the mass of
the beam; a slender beam has a lower first natural frequency than a more stiff beam. Each natural
frequency has a corresponding natural mode, which describes the movement of the structure when
vibrating in its natural frequency. For a simply supported beam, the first natural frequency always
result in a mode shape as in Figure 2.2b. This mode requires the lowest amount of energy to take
place (Chopra, 2007). The second natural frequency, 𝑓2 , will always result in the second mode shape,
as in Figure 2.2c, and the third natural frequency will result in the third mode shape, and so on.
(a) Simply supported beam (b) First mode (c) Second mode
If instead studying a cantilever beam, see Figure 2.3a, the mode shapes will look a bit differently
due to the different boundary conditions. The first mode shape, corresponding to the first and lowest
natural frequency of the beam, will look like Figure 2.3b. The second, third, fourth and fifth mode
shape can be seen in Figure 2.3c, 2.3d, 2.3e and 2.3f, respectively.
Due to the fact that the modes corresponding to the lowest frequencies require least energy to take
place, the lowest modes will dominate the total behaviour of the vibrating structure, and hence they
are the most important modes to study.
Different types of buildings will have different design requirements, depending on the specific
function, location, etc. For commercial buildings, like office buildings and hospitals, the demands
may be flexibility, resulting in e.g. long spans and large column-free floor areas (Naeim, 1991). These
are all design demands that might affect the risk of vibrational problems. The response in the middle
of a slab will generally be larger than the response at floor areas near supports (SteelConstruction.info,
2016). In the same way as the design demands vary for different buildings, the requirements with
regard to vibrations may be different. For residential buildings and schools, the purpose of reducing
the vibrational response might be to avoid discomfort, while in a lab or a hospital the demands might
be necessary to avoid sensitive equipments getting damaged or stop working properly.
When talking about the vibrational response of a building it is important to distinguish between
relative and total response. The relative response is the response of a structure in relation to the
ground as a reference. This type of response is often of interest when analysing the structural capacity
in ULS, for structures exposed to ground motions from e.g. earthquakes. However, when performing
analyses with regard to comfort, it is desired to study the experienced response. In those cases, the
ground motion needs to be added to the relative response, which results in what is further referred to
as the total response. This describes the response of a structure in relation to the original position as
a reference. As an example, Figure 2.4 shows the ground displacement 𝑑𝑔 , the relative displacement
𝑑𝑟𝑒𝑙 and the total displacement 𝑑𝑡𝑜𝑡 = 𝑑𝑔 + 𝑑𝑟𝑒𝑙 .
Figure 2.4: Example showing the ground displacement, relative displacement and total displacement.
There are many possible sources of vibrations in buildings, both with regard to structural capacity
and to comfort. From a ULS perspective the most common sources are earthquakes, which are major
concerns in several countries around the world (Chopra, 2007). In Sweden, however, this type of
ground motion is very rare and only considered for special designs, such as nuclear power plants. It
Another common problem is vibrations caused by mechanical equipments, like heating, ventilation
and air-conditioning systems, not being isolated sufficiently. In industrial facilities, these kinds of
problems can also be caused by heavy machinery within the building.
The focus of this report will, however, be vibrations caused by heavy traffic. This affects structures
close to roads and train tracks, and as our cities are expanding the problem becomes more current
(Hunaidi, 2000). The amplitudes of the vibrations are dependant on factors related to the road and
traffic, like surface conditions and weight of the vehicles and their speed. Generally, heavier vehicles
cause higher levels of vibration and the rougher the road surface is, the more the speed influence the
vibration amplitude. The vibrational level is also dependant on the soil conditions where the building
is constructed. According to Hunaidi, 2000, a lower stiffness of the soil causes higher vibrations.
The most vulnerable areas are those where the soil consist of a soft clay layer, approximately 7 to
15 meters deep. In those areas there are a higher risk of resonance or amplified vibration occurring,
since the natural frequencies of the soil and the building might coincide.
Vibrations, from the perspective of an acoustician, generally concern the effects of sounds. According
to Ginn, 1978, acoustics in buildings may be described as the propagation and transmission of sounds,
either airborne or structure borne, in rooms, dwellings and other buildings. The airborne sounds
originates from longitudinal wave motions in the air, created by some vibrating object causing sounds
directly to the air, like a speaker or a musical instrument, see Figure 2.5a. The structure borne sounds
act directly on the structure of the building, which acts as a medium that the sound waves transmit
through, see Figure 2.5b. Common sources are foot steps or vibrating equipments on the floor. Both
airborne and structure borne sounds are concerns mainly because of the noise they can cause. Some
noises can be dangerous and cause hearing damages, whereas some may just interfere with speech
conversations or disturb our concentration.
From the structural perspective, the effects of vibrations need to be considered from three main aspects:
strength, fatigue and discomfort (SteelConstruction.info, 2016). The strength aspect considers the
structural capacity of a building, it need to be able to resist the peak dynamic responses affecting it.
In countries with an extremely low probability of earthquakes, this aspect is seldom any concern.
However, even if the vibration levels are too low to cause any damage alone, they could contribute to
deterioration (Hunaidi, 2000). Even small levels of vibrations may trigger damage by increasing the
residual stresses, from e.g. repairs or temperature cycles, in building components. Fatigue damages
may occur if the structural components are subjected to repetitive cyclic loading, like vibrations lasting
continuously for many years. The last aspect, discomfort, covers how we, as humans, experience
vibrations. The response from e.g. heavy traffic is seldom a safety concern, but it can easily disturb
our everyday activities, like sleeping or having conversations (SteelConstruction.info, 2016). It has
been shown that humans are able to perceive vibrations of very low amplitudes. However, the level
of tolerance varies depending on whom you ask, what they are doing and whether they are aware of
the vibrational source. This makes it difficult to evaluate the discomfort aspect.
There are guideline values for vibrations in buildings which should be implemented in the design of
new buildings. According to the standard SS 460 48 61 (SIS, 1992), the values should be applied
strictly on residential buildings, whereas they could be applied less strictly on office buildings. It is
not intended that the values should limit vibrations from temporary sources, e.g. construction sites.
Table 2.1 shows the guideline values for velocity and acceleration. The values are root mean square
(RMS) values and weighted with regard to comfort, explained later in Section 2.1.3.
Table 2.1: Guildeline values for vibrations in buildings, from SS 460 48 61.
Weighed velocity Weighted acceleration
Moderate disturbance 0.4 - 1.0 mm/s 14.4 - 36.0 mm/s2
Probable disturbance >1 mm/s >36 mm/s2
The Swedish Transport Administration have developed a guidelines regarding noise and vibration
where they state the vibrational limits depending on the type of the premise. For residential buildings,
it is stated that the velocity should not exceed 0.4 mm/s, which is equivalent to the lowest values from
SS 460 48 61, see Table 2.1. The limit values regard vibrational levels during night (10 p.m.-6 a.m.).
The guidelines are developed to concretize what the Swedish Transport Administration regard as
acceptable vibration levels and is intended to function as an object when performing actions against
high vibration levels.
Depending on the frequency of a vibration, a human exposed to the vibration can have different
experiences. Vibrations in specific frequency ranges are more prone to cause discomfort than others
(Brüel and Kjær, 1989). Simply, the human body can be described as a mechanical system where
different parts of the body are sensitive to different frequency ranges, see Figure 2.6.
As can be seen, the abdomen is most sensitive to frequencies in the range 4-8 Hz, whereas the hands
experience most discomfort in the range 30-50 Hz. In buildings, structural vibration can affect the
occupants in many ways, for example cause discomfort or reduce their quality of life (SIS, 2003).
In order to make it possible to predict if a vibration will cause discomfort or not, frequency weighting
can be applied to the response signal (Brüel and Kjær, 1989). Frequencies in ranges where the human
body is most sensitive is multiplied with the highest factors and frequencies in other ranges are
multiplied with lower factors. By performing this weighting, a correlation between the vibrational
response and the subjective feeling of the vibration is obtained.
When evaluating a vibration with regard to comfort it is, according to the standard ISO 2631-2,
preferred to use RMS values that are weighted with frequency weighting factors.
RMS is defined as the arithmetic mean of the squares of a set of numbers, as:
√
1 2
𝑥𝑟𝑚𝑠 = (𝑥 + 𝑥2 2 + ... + 𝑥𝑛 2 ) (2.2)
𝑛 1
where 𝑥𝑟𝑚𝑠 is the RMS√ value of 𝑥1 to 𝑥𝑛 . For a sinus shaped signal, the RMS value is always the
amplitude divided by 2. When calculating the RMS, the signal of interest is divided into a number
of so called windows and one RMS value is calculated for each window. The size of the window is
dependent on the decided time weighting, e.g. fast (125 milliseconds) or slow (1 second). As an
example, Figure 2.7 shows a response signal with a corresponding RMS signal. The dots represent
the RMS values in each window, which in this example is 1 second long.
]
Acceleration m∕s2
[
Response signal
RMS response signal
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Time [s]
Figure 2.7: The response signal and the corresponding RMS response signal.
The frequency weighting factors should be applied to the RMS response of the signal that is measured
inside the building of interest. If it is not possible to get access to the building, for example if the
building is not yet built, the concept described in ISO 2631-2 can be applied in the same manner,
but trust have to be placed on the prediction of the vibration of the building. The vibrations shall be
measured in three directions; x-, y- and z-direction. Values measured from the direction that has the
largest frequency weighted vibration magnitude are the values that should be used for the evaluation
of the building.
In Figure 2.8, the weighting factors that should be applied to accelerations and velocities are plotted
as functions of the frequency. The frequencies are divided into so called one-third-octave bands
and all the responses of frequencies corresponding to the same one-third-octave band are multiplied
with the same weighting factor, see Table 2.2. If the response is in time domain, as in Figure 2.7,
the response signal has to be analysed to see what frequencies that are present, to be able to use the
correct weighting factor.
1.8
Acceleration
Weighting factor, 𝑊𝑚 [−]
1.6
1.4 Velocity
1.2
1.0
0.8
0.6
0.4
0.2
0
20 40 60 80
Frequency [Hz]
Figure 2.8: Frequency weighting factors for acceleration and velocity (SP, 1993).
According to SP, 1993, to get the weighted value of the acceleration, 𝑎𝑐𝑜𝑚𝑓 , or the weighted velocity,
𝑣𝑐𝑜𝑚𝑓 , the RMS values of the responses are multiplied with the weighting factors as:
√
𝑎𝑐𝑜𝑚𝑓 = (𝑊𝑚.1 ⋅ 𝑎1 )2 + (𝑊𝑚.1.25 ⋅ 𝑎1.25 )2 + ... + (𝑊𝑚.80 ⋅ 𝑎80 )2 (2.3)
where 𝑊𝑚.1 , 𝑊𝑚.1.25 ...𝑊𝑚.80 are the weighting factors to the corresponding one-third-octave band,
according to Table 2.2. 𝑎1 , 𝑎1.25 ...𝑎80 are the acceleration responses in each one-third-octave band
and 𝑣1 , 𝑣1.25 ...𝑣80 are the velocity responses.
Structural dynamics is the study of dynamical effects, such as vibrations, in structures subjected to
dynamic loads. These are loads that changes with time; in property of magnitude, direction or point
of application (Craig and Kurdila, 2006). Structures subjected to dynamic loads will experience
time-varying displacements and stresses, which are often referred to as dynamic responses.
An easy way of describing the basic equations of structural dynamics is with a damped spring-mass
model, see Figure 2.9a. The mass is moving horizontally as a rigid body and is prevented from
torsion and vertical movement; hence, the system has one degree of freedom. The single degree of
freedom (SDOF) system consists of a damper with damping coefficient 𝑐, a spring with stiffness
𝑘, and a mass with mass 𝑚. The mass is excited by the time-dependent force 𝑝(𝑡) and the resulting
displacement, as a function of time, is given as 𝑢(𝑡).
Figure 2.9b shows the free body diagram of the system in Figure 2.9a, where 𝐹𝑐 and 𝐹𝑠 represent the
damping force and the spring force, respectively. To derive the equation of motion for this system,
three fundamental laws of mechanics need to be applied (Craig and Kurdila, 2006). Firstly, Newton’s
Laws, or other energy principles that are equivalent, must be satisfied. For the system in Figure 2.9b,
Newton’s 2𝑛𝑑 law gives:
where 𝑢(𝑡)
̈ is the acceleration (second time-derivative of the displacement).
Secondly, the force-displacement relation for the spring and the force-velocity relation for the damper
need to be stated. These can be expressed respectively, for a linear elastic case, as:
𝐹𝑐 (𝑡) = 𝑐 𝑢(𝑡)
̇ (2.6)
𝐹𝑠 (𝑡) = 𝑘𝑢(𝑡) (2.7)
where 𝑢(𝑡)
̇ is the velocity (first time-derivative of the displacement).
Finally, the kinematics of deformation need to be taken into account. The mass in Figure 2.9 is
regarded as a rigid body; hence, no internal deformation of the system is accounted for.
The equations (2.7) and (2.6), inserted in Equation (2.5) gives the equation of motion for a damped
SDOF system:
̈ + 𝑐 𝑢(𝑡)
𝑚𝑢(𝑡) ̇ + 𝑘𝑢(𝑡) = 𝑝(𝑡) (2.8)
By defining the natural frequency and the damping ratio the equation of motion can be rewritten as
Equation (2.11). √
𝑘
Natural frequency: 𝜔𝑛 = (2.9)
𝑚
𝑐 𝑐
Damping ratio: 𝜁= = √ (2.10)
2 𝑚 𝜔𝑛 2 𝑘𝑚
The equations (2.9) and (2.10) inserted in Equation (2.8), and dividing by 𝑚, gives:
𝑝(𝑡)
̇ + 𝜔2𝑛 𝑢(𝑡) =
̈ + 2𝜁𝜔𝑛 𝑢(𝑡)
𝑢(𝑡) (2.11)
𝑚
As mentioned in Section 2.1, a system without the damping part would have an infinite motion, for
free vibration. The simplest form of damping is linear viscous damping, expressed in Equation (2.11),
Figure 2.10: Different levels of viscous damping for an SDOF system, from (Craig and Kurdila, 2006).
In the same manner as described in Section 2.2.1, the equation of motion for a multi degree of
Scanned by CamScanner
freedom (MDOF) system can be derived. Figure 2.11a shows an MDOF system consisting of three
different masses, connected with springs and dampers. The system has three degrees of freedom,
since the three masses are only moving horizontally. Figure 2.11b shows the free body diagram of
the system in Figure 2.11a.
The force-displacement relations for the springs and the force-velocity relations for the dampers are
𝐹𝑆1 = 𝑘1 𝑢1 (2.12)
𝐹𝑆2 = 𝑘2 (𝑢2 − 𝑢1 ) (2.13)
𝐹𝑆3 = 𝑘3 (𝑢3 − 𝑢2 ) (2.14)
𝐹𝐶1 = 𝑐1 𝑢̇ 1 (2.15)
𝐹𝐶2 = 𝑐2 (𝑢̇ 2 − 𝑢̇ 1 ) (2.16)
𝐹𝐶3 = 𝑐3 (𝑢̇ 3 − 𝑢̇ 2 ) (2.17)
where every 𝑢𝑖 and 𝑢̇ 𝑖 are functions of time 𝑡. Newton’s 2𝑛𝑑 law, together with the force-displacement/velocity
relations stated in Equation (2.12) to Equation (2.17), gives:
The equations (2.18), (2.19) and (2.20) can be written in matrix-form as:
[𝑚]{𝑢}
̈ + [𝑐]{𝑢}
̇ + [𝑘]{𝑢} = {𝑝(𝑡)} (2.21)
To calculate the natural frequencies of an undamped MDOF system, the free vibration equation of
motion need to be stated. A free vibration occurs when the external force is zero, {𝑝(𝑡)} = {0};
hence, Equation (2.21), for an undamped system, becomes:
[𝑚]{𝑢}
̈ + [𝑘]{𝑢} = {0} (2.22)
Inserting the equation of harmonic motion, see Equation (2.1), into Equation (2.22) gives the eigen-
value problem (Craig and Kurdila, 2006):
where 𝜔𝑖 is the different natural frequencies of the system and {𝜙𝑖 } is the corresponding natural
mode, or eigenvector. The variable 𝜆𝑖 = 𝜔2𝑖 represent the eigenvalues.
For the system in Figure 2.11, the determinant of ([𝑘] − 𝜆𝑖 [𝑚]) results in a cubic equation; hence,
three different eigenvalues, 𝜆1 , 𝜆2 and 𝜆3 , will be obtained. The number of obtained eigenvalues is
always equal to the number of degrees of freedom.
Each eigenvalue has a corresponding eigenvector that satisfies Equation (2.23). The system in
Figure 2.11 will generate the eigenvectors: {𝜙1 }, {𝜙2 } and {𝜙3 }, which can be combined to form
an eigenmatrix, [𝛷] = [{𝜙1 }{𝜙2 }{𝜙2 }]. The eigenmatrix, in combination with the mass matrix [𝑚]
and the stiffness matrix [𝑘] described in Equation (2.21), gives the diagonal modal mass matrix [𝑀]
and the diagonal modal stiffness matrix [𝐾]. These are defined respectively as:
By letting the displacement vector {𝑢} be expressed as {𝑢} = [𝛷]{𝛾}, where {𝛾} represent the modal
displacement vector, and pre-multiplying with [𝛷]𝑇 , Equation (2.22) can be rewritten as:
In the same manner as in Section 2.2.2.1, the equation of motion for a damped system can be expressed
as:
Unlike the modal mass and the modal stiffness matrix, the modal damping matrix is not diagonal and
the damping of a structure is seldom expressed in terms of individual element properties. Instead, it
is often defined at the system level and there are different ways in which the damping of a system can
result in a diagonal modal damping matrix. One of the most common type of damping, which also
where 𝑖 represents the different modes of the system. The equation of motion in modal coordinates,
Equation (2.27), can then be expressed as:
In reality, a building is seldom exposed to a continuous excitation, like a sinus wave. Instead,
the external force or ground motion will most likely vary randomly (Chopra, 2007). In that case,
solving the equation of motion using analytical methods, as in Section 2.2.1, is not possible and
instead numerical integrations are required. In methods for numerical integration, the time step
for each iteration is defined as 𝛥𝑡𝑖 = 𝑡𝑖+1 − 𝑡𝑖 , where, 𝑖 = 0, 1, 2, ..., 𝑛. The displacement, velocity
and acceleration at the time 𝑡𝑖 are denoted as 𝑢𝑖 , 𝑢̇ 𝑖 and 𝑢̈ 𝑖 , respectively. With the inital conditions
𝑢(0) = 𝑢0 and 𝑢(0)
̇ = 𝑢̇ 0 the following equation must always be satisfied:
The variable (𝑓𝑠 )𝑖 is the resisting force at the time 𝑖. For a linear elastic system it is defined as 𝑘𝑢𝑖 but
for a general case it is dependant on the prior displacement history. A numerical integration method
is applied to solve the equation of motion at the time 𝑡𝑖+1 :
In order to perform numerical integrations, a number of different methods can be used to approximate
the solution. Figure 2.12 shows a principle graph of these types of time-stepping methods. The
approaches of the methods vary, but they all need to fulfil three important requirements: accuracy,
stability and convergence. Accuracy means that the difference between the result from the approxima-
tion and the exact solution should be less than a defined tolerance. The stability condition requires the
numerical solution to be stable due to numerical round-off errors. Lastly, the convergence criterion
should be fulfilled so that the numerical solution approaches the exact solution as the time step is
decreasing.
The parameters 𝛾 and 𝛽 define the variation of acceleration over a time step and may be selected in
such manner that the method becomes unconditionally stable. To satisfy the requirement of accuracy,
stability and convergence, typical selections of the parameters are; 𝛾 = 1∕2 and 1∕6 ≤ 𝛽 ≤ 1∕4.
The special case when 𝛽 = 1∕4 is called Average acceleration method and the case when 𝛽 = 1∕6
is called Linear acceleration method. The Average acceleration method is unconditionally stable,
which can be shown by looking at the stability requirement for the Newmark-𝛽 method:
𝛥𝑡 1
≤ √ (2.36)
𝑇𝑛 𝜋 2√𝛾 − 2𝛽
From definition, when 𝛾 = 1∕2 and 𝛽 is chosen to 1∕4 the condition becomes: 𝛥𝑡∕𝑇𝑛 < ∞, which
means the method is stable for any frequency.
The approach of the Newmark-𝛽 method is to first select values for 𝛾 and 𝛽. The initial displacement
and velocity are known and defined as: 𝑢(0) = 𝑢0 and 𝑢(0)
̇ = 𝑢̇ 0 . The initial acceleration is defined
as:
𝑝0 − 𝑐 𝑢̇ 0 − 𝑘𝑢0
𝑢̈ 0 = (2.37)
𝑚
For a constant time step, 𝛥𝑡, the variables 𝑎, 𝑏 and 𝑘̂ are defined as:
𝑚 𝛾𝑐
𝑎= + (2.38)
𝛽𝛥𝑡 𝛽
( )
𝑚 𝛾
𝑏= + 𝛥𝑡 −1 𝑐 (2.39)
2𝛽 2𝛽
𝛾𝑐 𝑚
𝑘̂ = 𝑘 + + (2.40)
𝛽𝛥𝑡 𝛽(𝛥𝑡)2
𝛥𝑝̂𝑖
𝛥𝑢𝑖 = (2.41)
𝑘̂( )
𝛾𝛥𝑢𝑖 𝛾 𝑢̇ 𝑖 𝛾
𝛥𝑢̇ 𝑖 = − + 𝛥𝑡 1 − 𝑢̈ (2.42)
𝛽𝛥𝑡 𝛽 2𝛽 𝑖
𝛥𝑢𝑖 𝑢̇ 𝑖 𝑢̈ 𝑖
𝛥𝑢̈ 𝑖 = − − (2.43)
𝛽(𝛥𝑡)2 𝛽𝛥𝑡 2𝛽
𝛥𝑝̂𝑖 = 𝛥𝑝𝑖 + 𝑎𝑢̇ 𝑖 + 𝑏𝑢̈ 𝑖 (2.44)
Further, the displacement, velocity and acceleration at the time 𝑡 = 𝑖 + 1 are defined as:
The equations and principles described in Section 2.2 can be used in various ways to analyses the
dynamical response of different systems. The most thorough analysis to perform is a so called time
history analysis (THA), where the actual response is calculated at each time step. In some cases, such
detailed study is not necessary and only the maximum values are of interest. Then, it is common to
perform a response spectrum analysis (RSA), which gives an estimation of the response of an SDOF
system. If an MDOF system is to be analysed, the response need to be translated, using methods for
modal analysis.
In order to obtain the total response history record for a system, a THA is required. Such analysis
is carried out including all natural frequencies of interest, to get the response as a function of time.
Figure 2.13 shows examples of the displacement response of SDOF systems with different natural
vibration periods and damping ratios. A THA provides the full response of a system for a specific time
period. However, these kinds of analyses are often computationally demanding and time consuming.
Figure 2.15 is a flowchart showing the principles of the design process of response spectra. In this
example the response quantity of interest is the total acceleration. At first, a desired frequency range,
corresponding to various SDOF systems, is determined, see (1).
If only the relative response is of interest the same procedure as in Figure 2.15 is used, but without
adding the ground motion in step 3. This results in spectral values for the relative responses described
as:
As mentioned in Section 2.3.2, it is possible to calculate the maximum response of an SDOF system
through a response spectrum. If an MDOF system is to be analysed, the spectral value from the
response spectrum cannot be used directly, since it only represent the response of an SDOF system.
Since the DOFs in the MDOF system each will have individual responses, the spectral values (one
for each eigenfrequency of the system) need to be combined with the eigenmodes and the so called
modal participation factors (MPFs), 𝛤𝑖 , as in Equation (2.48). Every mode 𝑖 of the MDOF system
has a corresponding MPF, see Equation (2.49).
𝑎𝑖.𝑗 = 𝜙𝑖.𝑗 ⋅ 𝛤𝑖 ⋅ 𝑆𝑎.𝑖 (𝜁, 𝜔𝑖 ) (2.48)
⎡𝛤1 ⎤
⎢𝛤 ⎥
{𝛤 } = ⎢ 2 ⎥ (2.49)
...
⎢ ⎥
⎣𝛤𝑛 ⎦
where each 𝛤𝑖 is an MPF, corresponding to one of the modes of the analysed MDOF system.
where [𝑀] is the modal mass matrix described in Section 2.2.2, {𝜙𝑖 } is the eigenvector of the ith
mode and {𝑟} is the influence coefficient vector.
The influence coefficient vector {𝑟} contains one column and as many rows as the system has DOFs
that are not prescribed to zero, 𝑛 (Datta, 2010). The vector describes how the analysed structure
moves in relation to the direction of the load. {𝑟} can be calculated using the stiffness matrix [𝐾]
and the boundary conditions. First, [𝐾] is rearranged so that the values corresponding to the DOFs
that are to be condensed out (apart from the DOFs related to the supports), if any exists, is placed at
the end as:
[ ]
[𝐾𝑑𝑑 ] [𝐾𝑑𝑐 ]
[𝐾] = (2.52)
[𝐾𝑐𝑑 ] [𝐾𝑐𝑐 ]
If the number of DOFs that are condensed out is defined as 𝑎 and the number of remaining DOFs is
defined as 𝑏, [𝐾𝑑𝑑 ] has the dimension 𝑏 × 𝑏, [𝐾𝑑𝑐 ] is of dimension 𝑏 × 𝑎, [𝐾𝑐𝑑 ] is 𝑎 × 𝑏 and [𝐾𝑐𝑐 ] is
𝑎 × 𝑎.
A condensed stiffness matrix, [𝐾𝑑 ], corresponding to the remaining DOFs that are not condensed out
can be expressed as:
The matrix [𝐾𝑑 ], which will be of dimension 𝑚 × 𝑚, can be divided into sub matrices as well, where
the DOFs related to the supports, and hence prescribed to zero, are placed at the end as:
[ ]
[𝐾𝑛𝑛𝑑 ] [𝐾𝑛𝑠𝑑 ]
[𝐾𝑑 ] = (2.54)
[𝐾𝑠𝑛𝑑 ] [𝐾𝑠𝑠𝑑 ]
If the number of DOFs that are related to the supports is defined as 𝑐 and the number of remaining
DOFs is defined as 𝑑, [𝐾𝑛𝑛𝑑 ] has the dimension 𝑑 × 𝑑, [𝐾𝑛𝑠𝑑 ] is of dimension 𝑑 × 𝑐, [𝐾𝑠𝑛𝑑 ] is 𝑐 × 𝑑
and [𝐾𝑠𝑠𝑑 ] is 𝑐 × 𝑐.
The matrix [𝑅] will be of dimension 𝑑 ×𝑐, where each column corresponds to one of the support DOFs.
If the first support DOF is in the horizontal direction, for example as DOF 1 and 7 in Figure 2.16b,
the first column in the matrix [𝑅] will also be related to the horizontal direction. To get the vector
{𝑟} for the horizontal direction (used when the load is applied in the horizontal direction) all the
columns that are related to horizontal support DOFs are added as:
In the same way, to get the vector {𝑟} for the vertical direction (used when the load is applied in the
vertical direction) all the columns that are related to vertical support DOFs are added as:
For example, if a simply supported beam is to be analysed, as in Figure 2.16a, which is divided into
two elements and has 9 DOFs where four of them; 1,2,7 and 8 are support DOFS, see Figure 2.16b.
The matrix [𝑅] may look like as in Equation (2.58).
⎡ 0 −0.067 0 0.067⎤
⎢0.5 0 0.5 0 ⎥
⎢ ⎥
[𝑅] = ⎢ 0 0.5 0 0.5 ⎥ (2.58)
⎢ 0 −0.067 0 0.067⎥
⎢ 0 −0.067 0 0.067⎥
⎣ ⎦
Is is notable that the vectors {𝑟ℎ } and {𝑟𝑣 } only contains the values 1 and 0. As mentioned earlier,
{𝑟ℎ∕𝑣 } describes the movement of the analyzed structure in relation to the load. The rows in {𝑟}
represent the non-support DOFs 3,4,5,6 and 9. In {𝑟ℎ }, the second row, that represent DOF 4, is
equal to 1, which is the only horizontal DOF and hence, the only DOF moving in the same direction
as the load, if the load is applied in the horizontal direction. {𝑟ℎ } is used if the load is applied in the
horizontal direction and {𝑟𝑣 } is used if the load is applied in the vertical direction.
When 𝛤 is calculated, the response in each DOF can be found by multiplying each value of the eigen-
vectors with a spectral value 𝑆𝑎.𝑖 (𝜁, 𝜔𝑖 ) corresponding to the natural frequency 𝑓𝑖 and a corresponding
MPF 𝛤𝑖 , as already described, see Equation (2.48).
Further, to calculate the maximum response in each DOF, responses from all modes need to be taken
into account. This is done by combining the responses in each mode with a combination method,
explained further in Section 2.3.4.
As mentioned in Section 2.2.2, an MDOF system has a number of different eigenfrequencies and
eigenmodes. To calculate the response in a specific node, the responses from all modes in that
specific node need to be taken into account and combined (Chopra, 2007). In reality, these modes
will not occur exactly at the same time instant, and therefore the calculated combined value is an
approximation. This is due to the fact that, when using a response spectrum to determine peak
responses, information about the time when the peak responses occur is not available.
There are several different methods to combine these responses and the most common are: Absolute
Sum (ABSSUM), Square Root of Sum of Squares (SRSS) and Complete Quadratic Combination
(CQC). When using ABSSUM, the absolute value of the responses from all modes are added, as in
Equation (2.60). This provides an upper bound value, which is usually too conservative and therefore
usually not used in structural design applications.
∑
𝑛
𝑎𝑚𝑎𝑥.𝑖 ≤ |𝑎𝑖.𝑗 | (2.60)
𝑗=1
where 𝑎𝑚𝑎𝑥.𝑖 is the maximum acceleration in DOF number 𝑖, 𝑛 is representing the total number of
modes and 𝑎𝑖.𝑗 is the acceleration for DOF 𝑖 for mode number 𝑗.
√
√ √ 𝑛
√∑
𝑎𝑚𝑎𝑥.𝑖 ≃ 𝑎𝑖.1 2 + 𝑎𝑖.2 2 + ... + 𝑎𝑖.𝑛 2 = √ 𝑎𝑖.𝑗 2 (2.61)
𝑗=1
To overcome the limitations of the SRSS method if, for example, the values in the frequency range
are close to each other, the CQC method is recommended. This combination method is described by
the following equation:
√
√ 𝑛
√∑ ∑𝑛
∑𝑛
𝑎𝑚𝑎𝑥.𝑖 √
≃ √ 𝑎𝑖.𝑗 +
2 𝑎𝑖.𝑘 2 𝑎𝑖.𝑗 2 𝜌𝑘𝑗 (2.62)
√ 𝑗=1
√ 𝑘=1 𝑗=1
√ ⏟⏟⏟
𝑘≠𝑗
where 𝜌, called the correlation coefficient, weights the current mode to the previous mode. The
value varies between 0 and 1 and there exist many theories on the most correct way to compute it. A
common equation, proposed in Chopra, 2007, is:
𝜁 2 (1 + 𝛽𝑘𝑗 )2
𝜌𝑘𝑗 = (2.63)
(1 − 𝛽𝑘𝑗 )2 + 4𝜁 2 𝛽𝑘𝑗
where 𝛽 describes the ratio between the natural frequency of the current mode and the previous mode
as:
𝑓𝑘
𝛽𝑘𝑗 = (2.64)
𝑓𝑗
The calculation program is written in Visual Basic for Applications (VBA) and will later on be
referred to as the VBA script or the the VBA program. Essential parts of the script can be found in
Appendix D. The program consists of two main parts; one that creates response spectra for a specific
input load and one that analyse the modal response of a structure of interest. The structure can either
be a simply supported beam or a multi-storey building, modelled as a column. The results from the
modal response are either nodal accelerations or nodal velocities, comfort weighted or not. These
can be compared to current regulations regarding the maximum allowed responses for comfort in a
building, see Section 2.1.2.5.
In the first part of the program, which creates response spectra for a specific load, the user need to
insert the ground motion, 𝑎𝑔 (𝑡) or 𝑣𝑔 (𝑡), for which the response spectra should be generated and set
whether the input motion is an acceleration or a velocity. Further, the damping ratio 𝜁, the desired
minimum and maximum natural frequency of the spectra and the frequency percentage increment
in each step need to be defined. Further, it is possible to pick the 𝛾 and 𝛽 to decide what type of
Newmark-𝛽 method that should be used, see Section 2.2.3. With that information, it is possible to
use the VBA script to generate response spectra and hence find the maximum responses of SDOF
systems with varying natural frequencies.
In order to use the program to analyse MDOF systems, the user need to specify some additional
parameters. Two different types of models are possible to analyse: simply supported beams and
cantilevers with lumped masses (representing multi-storey buildings). For both models, the material
and geometrical parameters need to be defined as well as the number of beam elements the models
should consist of. For the simply supported beam, the number of elements controls the accuracy of
the results, whereas for the cantilever each element represents one level of a multi-storey building.
Additionally, for the cantilever, lumped masses need to be defined at each node to represent the weight
of the floors of the multi-storey building to be analysed. For both models, the boundary conditions
need to be defined by prescribing concerned DOFs to zero.
When running the analyses of the MDOF systems, the user gets the option whether to include comfort
weighting or not, as described in Section 2.1.3.
Depending on what type of ground motion that is used as input in the VBA program, different results
are generated. If the ground motion is a ground acceleration, the program generates response spectra
for total acceleration, relative acceleration, relative velocity and relative displacement, using the
principles described in Section 2.3.2. If instead the ground motion is a ground velocity, an additional
As mentioned, the first part of the program generates response spectra through the VBA script.
To compute the responses, the VBA script uses the Newmark-𝛽 method, which is described in
Section 2.2.3. Through the VBA-script, a vector of natural frequencies is created where the desired
minimum and maximum values are defined as inputs, as well as the frequency increment, defined as
a percentage. This increment determines the size of the frequency vector, where the total number of
frequencies, 𝑛, is calculated as:
(𝑓 )
log 𝑓𝑚𝑎𝑥
𝑥𝑛 𝑓𝑚𝑖𝑛 = 𝑓𝑚𝑎𝑥 ⇐⇒ 𝑛 = 𝑚𝑖𝑛
(3.1)
log(𝑥)
where 𝑥 is the frequency increment and 𝑓𝑚𝑖𝑛 and 𝑓𝑚𝑎𝑥 are the minimum and maximum frequencies. For
each natural frequency, the absolute values of acceleration, velocity and displacement are calculated
and the maximum values are collected in three vectors, one for each response. These vectors are
plotted with the corresponding frequency in order to create the response spectra.
To verify the results from the VBA script, the commercial FE program ADINA is used to generate
comparable response spectra for the same ground motion and damping ratio. To generate the response
spectra in ADINA, a model is required in order to be able to run the analysis. The model consist
of a 1D fixed column, meshed with 10 beam elements. The cross section is rectangular; height and
width 0.02 meters. The material is isotropic linear elastic with Young’s modulus 𝐸 = 30 GPa and the
density 𝜌 = 2500 kg/m2 . The ground motion is applied as a mass proportional load. The generated
response spectra will be independent of the input parameters of the model, except for the applied
ground motion and the damping ratio.
In the VBA script, the input parameters in Table 3.1 are used in the analyses for the verification,
described later in Section 3.2.2 and 3.2.3.
The Newmark-𝛽 method requires the ground acceleration in order to calculate the responses, see
Section 2.2.3. If the input ground motion is a ground velocity, and hence the ground acceleration is
unknown, a numerical derivation is required. This is performed by calculating the gradient in each
𝛥𝑣 𝑣 −𝑣𝑔.𝑖
time increment as: 𝑎𝑔.𝑖 = 𝛥𝑡𝑔 = 𝑔.𝑖+1
𝑡 −𝑡 𝑖+1 𝑖
Figure 3.1 illustrates the problem, where the input ground acceleration has the shape of a sinus curve,
see Figure 3.1a. If a numerical integration is performed, and the initial velocity is defined as 0,
the hypothetical ground velocity becomes as shown in Figure 3.1b. It is clear that the curve does
not oscillate about the 𝑥-axis, which means the ground velocity is always positive. If an additional
numerical integration is performed, the hypothetical ground displacement is obtained, see Figure
3.1c. It is clear that this method is incorrect, since the displacement increases continuously during
the whole time period. This means that a structure exposed to this ground displacement would move
forward for all eternity. For this example, it is easy to see that the correct value of 𝑣0 should be −0.25.
However, for a more complex load, this is not as straightforward and a general approach to find the
initial velocity through the VBA script has not been found.
]
Ground acceleration mm∕s2
1 1
[
0.5 0.5 2
[
0 0 1
−0.5 −0.5
0
−1 −1
0 5 10 0 5 10 0 5 10
Time, 𝑡 [s] Time, 𝑡 [s] Time, 𝑡 [s]
(a) Ground acceleration (b) Integrated ground acceleration (c) Integrated ground velocity
Figure 3.1: Example of numerical integration of a sinus curve.
Even though the way of integrating the ground motion as in Figure 3.1 obviously is wrong, it is
discovered that ADINA uses this method to obtain the total response spectra from an input ground
acceleration, see Section 2.1.2.1 where the distinction between relative and total response is explained.
Therefore, to be able to compare the results from VBA with ADINA, this method is used for the
analyses in Section 3.2.2, 3.2.3 and 3.3.2. For the further studies in this thesis however, the total
velocity is not calculated when the input ground motion is an acceleration. When the ground motion is
a velocity, both the total velocity and the total acceleration can be obtained, since numerical derivation
is straightforward. Further studies on how to numerically integrate the input ground motion is not
performed and it is considered beyond the scope of this report.
The first ground motion analysed in the VBA script is a sinus shaped ground acceleration, 𝑎𝑔 , described
as:
𝑎𝑔 = 𝐴 sin (𝜔1 𝑡)
where the amplitude, 𝐴, and the angular frequency, 𝜔1 , are arbitrary scalars, defined as 0.01 mm/s2
and 5 rad/s, respectively, and the variable 𝑡 represent the time at each time step. The applied ground
motion is showed in Figure 3.2a and the results from VBA and ADINA are shown in Figure 3.2b to
Figure 3.2d.
1000
]
Ground acceleration,
acceleration mm∕s2
Maximum absolute
0.01
100
]
𝑎𝑔 m∕s2
[
0 10
[
1 VBA
ADINA
−0.01
0.1
0 2 4 6 8 10 12 14 16 0.01 0.1 1 10 100
Time, 𝑡 [sec.] Natural frequency, 𝑓 [Hz]
(a) Ground acceleration (b) Response spectrum, acceleration
100 100
Maximum[ absolute
Maximum absolute
displacement [mm]
VBA
]
velocity mm∕s
ADINA
10
VBA
ADINA
1 10
0.01 0.1 1 10 100 0.01 0.1 1 10 100
Natural frequency, 𝑓 [Hz] Natural frequency, 𝑓 [Hz]
(c) Response spectrum, velocity (d) Response spectrum, displacement
Figure 3.2: Ground acceleration from simple sinus curve and corresponding response spectra.
As can be observed, the results from the VBA script and ADINA are very similar and there is no
significant difference. It is notable that in all the response spectra in Figure 3.2b to Figure 3.2d, a
peak value can be observed at a natural frequency of 0.79 Hz, which is equal to the frequency of the
load: 𝑓 = 𝜔1 ∕2𝜋 = 5∕2𝜋 = 0.79 Hz. Hence, a structure with a natural frequency of 0.79 Hz will
experience resonance when the load in Figure 3.2a is applied.
In a similar manner, the VBA script is used to analyse the response of a load with the shape of a
double sinus curve, described as:
1000
]
Ground acceleration,
acceleration mm∕s2
Maximum absolute
0.02 100
]
𝑎𝑔 m∕s2
[
0 10
[
1 VBA
−0.02 ADINA
0.1
0 2 4 6 8 10 12 14 16 0.01 0.1 1 10 100
Time, 𝑡 [sec.] Natural frequency, 𝑓 [Hz]
(a) Ground acceleration (b) Response spectrum, acceleration
100 1000
Maximum[ absolute
Maximum absolute
displacement [mm]
]
velocity mm∕s
10 100
VBA VBA
ADINA ADINA
1 10
0.01 0.1 1 10 100 0.01 0.1 1 10 100
Natural frequency, 𝑓 [Hz] Natural frequency, 𝑓 [Hz]
(c) Response spectrum, velocity (d) Response spectrum, displacement
Figure 3.3: Ground acceleration from double sinus curve and corresponding response spectra.
Similarly as in the previous example that described the response from a simple sinus curve, the
results from ADINA and the VBA script are very similar. All the response spectra in Figure 3.3b
to Figure 3.3d have peak values at the same natural frequencies: 0.79 Hz and 1.11 Hz. These
frequencies are equal to the frequencies of the load, due to 𝑓 = 𝜔1 ∕2𝜋 = 5∕2𝜋 = 0.79𝐻𝑧 and
𝑓 = 𝜔2 ∕2𝜋 = 7∕2𝜋 = 1.11 Hz. Hence, a structure with a natural frequency of 0.79 Hz or 1.11 Hz
will experience resonance when the load in Figure 3.3a is applied.
To verify that the VBA script is applicable for a more realistic load case as well, responses due to
traffic flow measured at Grafiska Vägen in Gothenburg, close to both a highway and a railway, are
evaluated. The measured ground motion is showed in Figure 3.4a. The ground motion has a duration
of approximately 16 seconds and the time step between each measurement is about 0.0061 seconds,
which results in a load vector with 2622 elements. As can be observed, the results are very similar
and there is no significant difference for this load either.
]
Ground acceleration,
acceleration mm∕s2
Maximum absolute
0.01 100
]
𝑎𝑔 m∕s2
10
[
0
1
[
VBA
−0.01 0.1 ADINA
0.01
0 2 4 6 8 10 12 14 16 0.01 0.1 1 10 100
Time, 𝑡 [sec.] Natural frequency, 𝑓 [Hz]
(a) Ground acceleration from traffic flow, measured at (b) Response spectrum, acceleration
Grafiska vägen, Gothenburg
10 10
Maximum[ absolute
Maximum absolute
displacement [mm]
]
velocity mm∕s
1
VBA VBA
ADINA ADINA
0.1 1
0.01 0.1 1 10 100 0.01 0.1 1 10 100
Natural frequency, 𝑓 [Hz] Natural frequency, 𝑓 [Hz]
(c) Response spectrum, velocity (d) Response spectrum, displacement
Figure 3.4: Ground acceleration from traffic flow and corresponding response spectra.
In the second part of the program, the response in each node of an MDOF system, the modal response,
is calculated. First, the natural frequencies and the corresponding modal participation factors (MPFs)
for the structure to be analysed need to be calculated. The MPFs, defined in Equation (2.51), are
used to translate the SDOF response obtained from the response spectra to the response of an MDOF
system, as described in Section 2.3.3. For each natural frequency of the structure, a corresponding
spectral value is found in the response spectra which is further multiplied with the corresponding
MPF and eigenvector. To verify the MPFs, the responses are compared to responses from ADINA.
For the verification, a simply supported beam is analysed. The load is applied in the vertical direction,
see Figure 3.5.
In both ADINA and in the VBA script, the beam is divided into an appropriate number of 2D
To decide an appropriate number of elements to use in the analyses, the vertical relative acceleration
is calculated with both the VBA script and ADINA, for beams divided in varying number of elements,
see Figure 3.6. The analysed beam has a length of 10 meters and a rectangular cross section; height
1.2 meter and width 0.6 meter. For the VBA analyses, the relative acceleration starts to converge for
about 16 elements, see Figure 3.6a, which is considered to give sufficient reliability in the results and
still provide low computational time. When the results from the ADINA analyses are plotted, the
curve converges as well, see Figure 3.6b. 30 number of elements in the ADINA model is considered
to give sufficient reliability in the results.
Relative[acceleration,
Relative[acceleration,
]
]
𝑎𝑟𝑒𝑙 mm∕s2
𝑎𝑟𝑒𝑙 mm∕s2
0 4 8 12 16 20 24 0 4 8 12 16 20 24 28 32 36 40
Number of elements [−] Number of elements [−]
(a) Analysis in VBA (b) Analysis in ADINA
Figure 3.6: The impact of number of elements on relative acceleration.
The values of the MPFs are highly dependant on how the eigenvectors are scaled, therefore the MPFs
from the VBA script can not simply be compared to the ones obtained from ADINA. However, an
MPF multiplied with the corresponding eigenvector will give the same result independent of how
the eigenvector is scaled. Since the MPF and the corresponding eigenvector should be multiplied
with the spectral response, as described in Equation (2.48), the total response is also independent of
how the eigenvectors are scaled. Therefore, the total response from the VBA script is verified with
the total response from ADINA, instead of comparing the MPF values. In both programs, response
spectra are used to obtain the spectral values, which are multiplied with the MPFs to get the total
response.
Two simply supported beams with different lengths are analysed, the properties are described in
Table 3.2. The applied ground motion is the one in Figure 3.4a in Section 3.2.3. In both analyses,
the damping ratio is 5% and the total response (sum of relative response and ground motion) in the
mid node is analysed, see Table 3.3 for the results for Beam 1 and Beam 2. As can be observed,
the results from the VBA script and ADINA differ with less than 2%, the VBA script is therefore
considered reliable for response spectrum analysis (RSA).
A number of simply supported beams with varying geometrical properties, see Table 3.4, are analysed
with the VBA script using RSA. The model used in the VBA script can be seen in Figure 3.8. For
all analyses, the applied ground motion is the one in Figure 3.4a in Section 3.2.3. In order to study
the accuracy of the method, a time history analysis (THA) is carried out with mode superposition
analysis in ADINA. A THA gives, as described in Section 2.3.1, the response of a structure as a
function of time. This means that for every time step a THA gives the actual response, in comparison
to an RSA where only the peak values for the natural frequencies of a structure are obtained.
Table 3.4: Properties of the analysed beams, see Figure 3.7 for definitions.
Length Height Width Density Young’s modulus First mode frequency
Analysis
[m] [m] [m] [kg/m3 ] [GPa] [Hz]
1 25 0.50 0.25 2500 30 1.26
2 20 0.50 0.25 2500 30 1.96
3 10 0.20 0.10 2500 30 3.14
4 15 0.50 0.25 2500 30 3.49
5 10 0.80 0.40 2500 30 12.57
6 10 1.20 0.60 2500 30 18.85
7 10 1.60 0.80 2500 30 25.13
8 5 0.50 0.25 2500 30 31.41
In the first analyses, the ground motion is not included in the response. The relative response obtained
from the VBA script is compared to the relative response from a THA in ADINA. In this way, the
actual experienced response is not obtained, since it requires that the ground motion is included as
well, but it is possible to study the accuracy of the RSA. As mentioned, the properties of the analysed
structures are described in Table 3.4. For each analysis, the vertical relative response in node A, see
Figure 3.8, is analysed. The results from the RSA (from the VBA script) and the THA (from ADINA)
are shown in Figure 3.9, 3.10 and 3.11, for acceleration, velocity and displacement, respectively. The
error term in the tables represents the difference in the results in relation to the THA. The graphs
are plotted as a function of the first mode frequency of the beams in Table 3.4, and hence each point
represents one analysis.
Figure 3.9: Comparison of maximum relative acceleration from RSA and THA, node A.
Figure 3.10: Comparison of maximum relative velocity from RSA and THA, node A.
Figure 3.11: Comparison of maximum relative displacement from RSA and THA, node A.
As can be observed, the difference between the RSA and the THA results are less than 11% for
all analyses. It is not possible to see any correlation between the size of the error term and the
corresponding beam stiffness (first mode frequency), but since the error term is relatively low, the
RSA results are considered reliable for the relative response.
Solely having the relative response is not sufficient to estimate the vibrational comfort experience of a
structure, see Section 2.1.2.1. In addition, the applied ground motion need to be added to get the total
response. A question that arises with this is how to include the ground motion in a correct manner.
For these studies, only the total acceleration is analysed, since the applied load is an acceleration, see
Section 3.2.1. It is assumed that the studied methods are equally applicable to get the total velocity
(if the applied load is a velocity instead).
In a first study, the ground motion is included in the response spectrum, as described in Figure 2.15.
The ground motion is added to the relative response in every time step for the desired frequency
range, giving a total response, and the maximum values are plotted in a response spectrum. As
described in Section 2.3.3, the response for each natural frequency of the analysed structure is found
and multiplied with the corresponding MPF and eigenvector. However, this induces an error since the
Figure 3.12: Comparison of maximum total acceleration from RSA and THA, node A.
As could be expected, the results from the RSA are not as close to the results from the THA as for
the relative response. The largest error is almost 30%. The explanation to why some of the RSA
results are considerably larger than the THA results for the total response is assumed to be that
the ground motion is included in the response spectrum, and hence in the modal combination. For
some frequencies, the ground motion term is considerably larger than the relative response term and
hence has large influence on the total response. It can therefore be assumed that if structures in these
frequency ranges are analysed, the difference between the results from the RSA and THA may be
significant.
In order to try reducing the error term, a second study is performed. Since the response spectrum
analyses are resulting in conservative values for the larger error terms, it is concluded that the
responses from these analyses should be lower. In this study, only the maximum relative response for
each mode is combined with the SRSS rule and the contribution from the ground motion is added
for the first mode only, since this is the most important mode for the response of the mid node, see
Section 2.1.1. The equation that is used to calculate the maximum acceleration in each DOF 𝑖 can be
described as:
√
𝑎𝑚𝑎𝑥.𝑖 = 𝑎𝑖.1 2 + 𝑎𝑖.2 2 + ... + 𝑎𝑖.𝑛 2 + 𝛥𝑅1 (3.3)
where 𝛥𝑅1 represents the difference between the total response and the relative response of the first
natural frequency. As an example, the definition of 𝛥𝑅1 is graphically explained for Analysis 1 in
Figure 3.13 for the natural frequency 1.26 Hz of the first mode.
100
Total acceleration
[
Relative acceleration
10 𝛥𝑅1
0.1
The beams in Table 3.4 are analysed with this method and compared to the same time history analyses
from ADINA as in Figure 3.12. Like previously, the total vertical acceleration in the mid node is
compared and the results are shown in Figure 3.14.
Figure 3.14: Maximum acceleration calculated with Equation (3.3) and maximum acceleration from THA.
The errors, for this second study, are much smaller compared to the analyses in Figure 3.12, but to be
sure it is not a coincidence, further studies are performed. Since the contribution from the ground
motion is only included for the first mode, the response in a different node (where the first mode
necessarily is not decisive) need to be checked. Therefore, the same analyses are performed for node
B and C (see Figure 3.8). The results are presented in Figure 3.15 and 3.16. As can be seen in the
tables, there are significant differences in the results between the RSA and the THA for some of
the analyses. A possible explanation for the large error values could be that for these nodes a 𝛥𝑅
corresponding to one of the other modes should be used instead. As an example, Table 3.5 shows the
𝛥𝑅 values for the five first modes of Analysis 1. As can be seen, the error is smaller if 𝛥𝑅4 is added
instead of 𝛥𝑅1 , even though adding 𝛥𝑅4 also gives a large error. As a matter of fact, the frequency
and mode that gives 𝛥𝑅4 is the one generating the third mode, explained in Section 2.1.1, which is
the one that most likely will give the largest vertical displacement in node C.
Figure 3.15: Maximum acceleration calculated with Equation (3.3) and maximum acceleration from THA.
Figure 3.16: Maximum acceleration calculated with Equation (3.3) and maximum acceleration from THA.
Further analyses are therefore done for node C, where 𝛥𝑅4 is added instead of 𝛥𝑅1 in Equation (3.3).
The results can be seen in Figure 3.17. It is clear that this method is unreliable for some nodes and it
is therefore not further used. Because of this, the method in the first study, where the ground motion
is included in every time step, is considered most reliable and is used in further analyses in this report,
even though the RSA results and the THA results differ with as much as 30%. However, finding a
different method to include the ground motion, and hence reduce the error with respect to the time
history analyses, is recommended for future studies.
40
𝑎𝑡𝑜𝑡 mm∕s2
Figure 3.17: Maximum acceleration calculated with 𝛥𝑅4 instead of 𝛥𝑅1 in Equation (3.3).
To further investigate the RSA method where the ground motion is included in every time step,
additional simply supported beams are studied, described in Table 3.6. Together with the previously
analysed beams from Table 3.4, a wide range of stiffness is covered, the first natural frequency of
the beams span from 0.64 Hz to 358 Hz. Additionally, the vertical acceleration in node B and C in
Figure 3.8 is analysed. The results for all 16 analyses for node A, B and C are shown in Figure 3.18,
3.19 and 3.20, respectively.
50 RSA
]
THA
𝑎𝑡𝑜𝑡 mm∕s2
40
30
20
[
10
0
1 10 100
First mode frequency, 𝑓 [Hz]
Figure 3.18: Total acceleration in node A for beams in Table 3.4 and Table 3.6. Data from Table B.1.
Total acceleration,
50 RSA
]
THA
𝑎𝑡𝑜𝑡 mm∕s2
40
30
20
[
10
0
1 10 100
First mode frequency, 𝑓 [Hz]
Figure 3.19: Total acceleration in node B for beams in Table 3.4 and Table 3.6. Data from Table B.2.
50 RSA
]
THA
𝑎𝑡𝑜𝑡 mm∕s2
40
30
20
[
10
0
1 10 100
First mode frequency, 𝑓 [Hz]
Figure 3.20: Total acceleration in node C for beams in Table 3.4 and Table 3.6. Data from Table B.3.
The largest error value is about 30% for both node A and B and about −30% for node C, see
Table B.1, B.2 and B.3 in Appendix B. Even though the response spectrum analyses are not resulting
in conservative values for all analyses, the errors obtained are considered to be within an accepted
limit for the purpose of this simplified method. To investigate the origin of the errors, the MPF value
multiplied with the corresponding eigenvalue for node A, B and C for all 16 analyses is studied, see
Table 3.7.
Table 3.7: MPF multiplied with corresponding eigenvalue.
√ √ √
∑
𝑛 ∑
𝑛 ∑
𝑛
Analysis Node A, 𝛤𝑖 𝜙𝑖.𝐴 Node B, 𝛤𝑖 𝜙𝑖.𝐵 Node C, 𝛤𝑖 𝜙𝑖.𝐶
𝑖=1 𝑖=1 𝑖=1
1-16 1.36 0.96 0.65
The product for each mode is combined using the SRSS modal combination rule. As mentioned in
Section 3.3.3.2, this factor induces an error when multiplied with the total response, since it scales
not only the relative response but also the ground motion. From Table 3.7 it is clear that the product
of the MPF and the eigenvalue remains the same for all analyses, but it varies for different nodes. It
is reasonable to believe that the size of the product is related to the size of the error term between the
RSA and the THA results. For example, for node A the product is 1.36, which means the spectral
values are multiplied with a factor 1.36, and hence the ground motion contribution is about 36%
larger than the actual ground motion. This could explain the largest error term of about 30% between
the RSA and THA results for node A, see Figure 3.18. In Table 3.7 it can also be observed that for
As mentioned in Section 3.1, the output values from the VBA script can be compared to response
values in current regulations, to evaluate whether the response of a building is within the limits or
not. The values in the regulations are root mean square (RMS) values and weighted with frequency
weighting factors for comfort, as described in Section 2.1.3. Therefore, the values from the VBA script
need to be RMS values and comfort weighted as well, to get values comparable to the regulations.
No established method to implement this on response spectrum analyses has been found in literature,
and therefore studies are made to find a reliable approach. Two different approaches are studied and
compared to each other and to the unweighted response. For both approaches, the damping ratio 𝜁 is
defined as 5%.
For the studies in this section, the results from the VBA script are compared to comfort weighted
responses from time history analyses. These THA results are comfort weighted using the same
principles as described in Section 3.4.2. It should be noted, however, that these values are not
confirmed as correctly comfort weighted responses. Instead, the purpose is to illustrate the difference
between the RSA and the THA results. For the comparisons, the THA results are considered as the
correct responses and the error values in the tables are calculated with regard to them.
As always when designing a response spectrum, the time dependent response for each studied natural
frequency is found. To implement RMS on the response spectrum, the time dependent response for
each natural frequency is divided into a number of so called windows, see the top horizontal axis
in Figure 3.21, where each window is defined as one second long, no overlapping. The response
values in each window, 𝑟𝑓 .𝑖.1 , 𝑟𝑓 .𝑖.2 , ... , 𝑟𝑓 .𝑖.𝑛 , are inserted in Equation (3.4), which gives a positive
mean value of all values in each window, 𝑟𝑟𝑚𝑠.𝑓 .𝑖 . The reponse values can be either velocities or
accelerations.
√
1
𝑟𝑟𝑚𝑠.𝑓 .𝑖 = (𝑟 2 + 𝑟𝑓 .𝑖.2 2 + ... + 𝑟𝑓 .𝑖.𝑛 2 ) (3.4)
𝑛 𝑓 .𝑖.1
where 𝑟𝑟𝑚𝑠.𝑓 .𝑖 represents the RMS value of the response for a specific SDOF system with the natural
frequency 𝑓 and for each window, 𝑖. 𝑟𝑓 .𝑖.𝑛 is the 𝑛𝑡ℎ response value in the 𝑖𝑡ℎ window. An example is
shown in Figure 3.21, where the dotted line shows the RMS values of the black curve in each window.
[ frequency
] 𝑓
m∕s2
with natural
Response signal
RMS response signal
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Time [s]
Figure 3.21: The response signal and the corresponding RMS response signal.
⎡𝑟𝑟𝑚𝑠.𝑓 .1 ⎤
⎢𝑟 ⎥
{𝑟𝑟𝑚𝑠.𝑓 } = ⎢ 𝑟𝑚𝑠.𝑓 .2 ⎥ (3.5)
...
⎢ ⎥
⎣𝑟𝑟𝑚𝑠.𝑓 .𝑛 ⎦
where {𝑟𝑟𝑚𝑠.𝑓 } represent a vector with all the RMS values of the response, for an SDOF system with
the natural frequency 𝑓 . These are shown as the dotted line in Figure 3.21.
All the values of {𝑟𝑟𝑚𝑠.𝑓 } are multiplied with a frequency weighting factor, 𝑊𝑚.𝑓 , see Equation (3.6).
⎡𝑟𝑟𝑚𝑠.𝑓 .1 ⋅ 𝑊𝑚.𝑓 ⎤
⎢𝑟 ⋅ 𝑊𝑚.𝑓 ⎥
{𝑟𝑟𝑚𝑠.𝑓 } ⋅ 𝑊𝑚.𝑓 = ⎢ 𝑟𝑚𝑠.𝑓 .2 ⎥ (3.6)
...
⎢ ⎥
⎣𝑟𝑟𝑚𝑠.𝑓 .𝑛 ⋅ 𝑊𝑚.𝑓 ⎦
The weighting factors correspond to the natural frequency 𝑓 , see Figure 2.8 in Section 2.1.3. For
this first approach, the weighting factors are assumed to correspond to the natural frequencies of the
SDOF system that generates the response, and hence all values in the response signal are multiplied
with the same weighting factor, even though the total response in fact consist of several frequencies.
The reason for this is because the ground motion is added (total response) and that the system is
excited with a forced vibration. This approach is therefore regarded as a simple way of including the
comfort weighting factors and hence the accuracy need to be checked.
The maximum value of Equation (3.6) is plotted in the response spectrum and the procedure is
repeated for every natural frequency to be plotted. A flowchart of the principles of Approach 1 can
be seen in Figure 3.22.
The same load as described in Figure 3.4a in Section 3.2.3 is analysed with this approach and
the generated response spectrum can be seen in Figure 3.23, showing both the unweighted total
acceleration and the comfort weighted RMS acceleration. As can be seen, the comfort weighted
curve differ significantly from the unweighted curve for higher frequencies. This is reasonable since
the weighting factors for accelerations are lower for high frequencies, see Figure 2.8 in Section 2.1.3.
10
1
0.1
0.01
Node A, Approach 1
[ total ]
acceleration, 𝑎𝑐𝑜𝑚𝑓 mm∕s2
30 𝑎𝑐𝑜𝑚𝑓 [mm/s2 ]
RSA Analysis RSA THA Error
THA 1 2.72 3.14 -13.3%
Comfort weighted
20
2 8.22 8.04 2.3%
3 15.25 16.05 -5.6%
10 4 24.73 21.87 13.1%
5 3.62 6.27 -42.3%
0 6 2.24 5.54 -59.1%
7 1.77 5.48 -67.6%
0 5.0 10.0 15.0 20.0 25.0 30.0 35.0 8 1.52 5.82 -73.9%
First mode frequency, 𝑓 [Hz]
Node B, Approach 1
[ total ]
acceleration, 𝑎𝑐𝑜𝑚𝑓 mm∕s2
30 𝑎𝑐𝑜𝑚𝑓 [mm/s2 ]
RSA Analysis RSA THA Error
THA 1 1.92 1.28 50.8%
Comfort weighted
20
2 5.81 5.00 16.2%
3 10.71 10.94 -2.1%
10 4 17.49 14.84 17.8%
5 2.56 5.81 -56.0%
0 6 1.58 5.33 -70.3%
7 1.25 5.25 -76.1%
0 5.0 10.0 15.0 20.0 25.0 30.0 35.0 8 1.07 5.42 -80.2%
First mode frequency, 𝑓 [Hz]
Node C, Approach 1
[ total ]
acceleration, 𝑎𝑐𝑜𝑚𝑓 mm∕s2
30 𝑎𝑐𝑜𝑚𝑓 [mm/s2 ]
RSA Analysis RSA THA Error
THA 1 1.46 2.82 -48.2%
Comfort weighted
20
2 3.22 3.19 1.1%
3 5.82 5.93 -2.0%
10 4 9.47 7.50 26.3%
5 1.38 5.41 -74.4%
0 6 0.86 5.18 -83.5%
7 0.68 5.11 -86.7%
0 5.0 10.0 15.0 20.0 25.0 30.0 35.0 8 0.58 5.14 -88.7%
First mode frequency, 𝑓 [Hz]
For Approach 1, the weighting factors are assumed to correspond to the natural frequencies of the
SDOF systems that gives the response. As mentioned, this induces an error since the responses in
fact consist of several frequencies. In order to get a more accurate response value, multiple weighting
factors are used for each response. To do this, the SDOF responses need to be analysed with regard
to which frequencies they consist of, in order to be able to multiply the response values with the
correct weighting factors. This is done with a fast Fourier transformation (FFT), which converts the
response signal from the time domain to the frequency domain, see (1) in Figure 3.27.
Figure 3.27: Flowchart of the principles when comfort weighting with Approach 2.
Further, this converted response is analysed in a calculation sheet created by Sound & Vibrations
at ÅF-Infrastructure AB. The calculation sheet uses techniques for comfort weighting and RMS, as
described in Section 2.1.3. A description of the calculation sheet can be found in Appendix C. The
calculation sheet partitions the response signal (see (2) in Figure 3.27) from the FFT with regard to
so called one-third-octave bands, see Table 2.2 in Section 2.1.3.2. This partitioning is commonly
10
0.1
0.01
It is obvious that Approach 1 and 2 does not give the same results for higher natural frequencies. One
explanation to this, for this specific ground motion, may be that for higher frequencies the ground
motion dominates the total response, rather than the relative response of the SDOF systems. This
means that the natural frequencies of the SDOF systems does not always dominate the contents of
the frequency domains of the responses. Hence, the weighting factors corresponding to the natural
frequencies can not simply be used for every response value, as in Approach 1. Since Approach 2
analyse exactly which frequencies the responses consist of and match them with the corresponding
weighting factors, it is considered most reliable and is assumed to comfort weight the responses in a
correct way. Due to the large difference between the approaches, Approach 1 is considered unusable.
Instead, Approach 2 is implemented in the final VBA script to be able to analyse structures with
various parameters with regard to comfort weighting.
The beams from Table 3.4 are studied and the same ground motion as in Figure 3.4a in Section 3.2.3
is used for the analyses. The results are compared to comfort weighted values, obtained with THA in
ADINA, see Figure 3.29, 3.30 and 3.31.
20
2 7.74 8.04 -3.7%
3 15.77 16.05 -1.7%
10 4 21.38 21.87 -2.3%
5 7.90 6.27 26.1%
0 6 7.25 5.54 30.9%
7 7.18 5.48 31.0%
0 5.0 10.0 15.0 20.0 25.0 30.0 35.0 8 7.42 5.82 27.4%
First mode frequency, 𝑓 [Hz]
Node B, Approach 2
[ total ]
acceleration, 𝑎𝑐𝑜𝑚𝑓 mm∕s2
30 𝑎𝑐𝑜𝑚𝑓 [mm/s2 ]
RSA Analysis RSA THA Error
THA 1 2.38 1.28 86.6%
Comfort weighted
20
2 5.47 5.00 9.4%
3 11.15 10.94 1.9%
10 4 15.11 14.84 1.8%
5 5.59 5.81 -3.8%
0 6 5.12 5.33 -3.8%
7 5.07 5.25 -3.4%
0 5.0 10.0 15.0 20.0 25.0 30.0 35.0 8 5.25 5.42 -3.2%
First mode frequency, 𝑓 [Hz]
Node C, Approach 2
[ total ]
acceleration, 𝑎𝑐𝑜𝑚𝑓 mm∕s2
30 𝑎𝑐𝑜𝑚𝑓 [mm/s2 ]
RSA Analysis RSA THA Error
THA 1 2.70 2.82 -4.3%
Comfort weighted
20
2 3.71 3.19 16.5%
3 6.39 5.93 7.8%
10 4 8.45 7.50 12.7%
5 3.63 5.41 -33.0%
0 6 3.41 5.18 -34%
7 3.39 5.11 -33.7%
0 5.0 10.0 15.0 20.0 25.0 30.0 35.0 8 3.46 5.14 -32,7%
First mode frequency, 𝑓 [Hz]
As can be seen, the error terms are much smaller than the ones obtained with Approach 1 (see
Figure 3.24, 3.25 and 3.26). Approach 2 is therefore regarded as a sufficiently reliable method to use
to implement the comfort weighting factors into the VBA script.
In order to use the VBA script to analyse not only simply supported beams but also multi-storey
buildings, representative models are designed and verified with ADINA. The structural system of
the buildings to be analysed for the verification consist of squared, concrete floors simply supported
by concrete columns at each level, see Figure 3.32a. All columns are assumed to have a squared
cross section and the dimensions are assumed to be the same along the heights of the buildings.
Additionally, each floor is assumed to have the same mass. The structures can be simplified to 2D
frame models, which further can be simplified to 2D columns, see Figure 3.32b and 3.32c. The model
to be used in the VBA script is a 2D column, fixed at the support, with as many beam elements as
levels of the structure to be analysed. Each beam element represents the stiffness and weight of the
total number of columns on each level. Lumped masses are added to the nodes between the elements,
see Figure 3.32c, to represent the weight of the floors, which are assumed to be rigid.
←→ ←→
To verify the model in the VBA script, a 2D frame model, as the one in Figure 3.32b, is analysed
in ADINA, which is assumed to give a more accurate representation of reality than the 2D column
model. The natural frequencies of the 2D column model in the VBA script and the 2D frame model
in ADINA are compared in order to see if the models are equivalent. In the ADINA model, each
column represents the stiffness and weight of all underlying columns. The floors connecting the
columns are given a stiffness 100 times larger than the stiffness of the columns, in order to regard
them as rigid.
The equivalence of the 2D frame model in ADINA and the 2D column model in the VBA script is
studied with regard to the influence of the floor spans and the influence of the number of columns per
level in the models.
In order to study how the floor span influence the equivalence of the ADINA models and the VBA
models, three analyses are performed for structures with the spans: 4, 8 and 12 meters. All three
structures consist of six floors, supported by four columns at each level with a height of 3.5 meters.
In the VBA script, the same model is used for all three analyses, whereas in ADINA three different
models are used, see Figure 3.33. For the comparison, it is desired to use the same model in the VBA
Figure 3.33: The analysed models when studying the influence of floor spans.
The natural frequencies of the first four modes, shown in Figure 3.34 and 3.35 for the span of 4
meters, are compared. The results can be seen in Table 3.9 to 3.11. The error term is calculated in
relation to the natural frequencies obtained from ADINA.
It is clear that the VBA model and the ADINA model are compatible, independent on the floor spans.
The natural frequencies for the first modes are almost the same for the two models and it is therefore
assumed that the VBA model can be used in further studies, as long as the floors are assumed to be
rigid.
←→ ←→
(c)
(a) (b) VBA script model
Analysed building ADINA model
Figure 3.39: Analysis 4: analysed building and building models, 3x3 columns.
←→ ←→
Figure 3.40: Analysis 5: analysed building and building models, 4x4 columns.
←→ ←→
Figure 3.41: Analysis 6: analysed building and building models, 5x5 columns.
The results show that the number of columns on each floor does not influence the difference between
the natural frequency of the VBA model and the ADINA model. It can therefore be assumed that the
VBA model is fair to use to model buildings of various sizes.
Through the various analyses and verifications described previously in Chapter 3, a reliable program
in VBA is developed. It is concluded that it is possible to use the script to generate response spectra
for acceleration, velocity and displacement and obtain results equal to results from a commercial FE
program. With these spectra, responses of various SDOF system can be obtained.
With the VBA script, it is also possible to analyse the response of simple structures, as simply
supported beams and columns with lumped masses, with various material and geometrical properties.
In Section 3.3.3, it is shown that for relative responses the script generates results very similar to
A previous study has been made by ÅF-Infrastructure AB with the purpose to predict future vibrations
in the planned residential buildings in the neighbourhood Tändstickan in Gothenburg (Carlsson,
2016). Analyses were made on a building called T41, which was assumed to experience the largest
vibrations in the neighbourhood. The study was made with regard to vibrations from nearby train
traffic and comfort weighted responses were calculated using time history analyses. Further, the results
were compared to current regulations, limiting the comfort weighted RMS response to 0.4 mm/s.
Figure 4.1 shows a visualisation of the intended neighbourhood, the location is the same as pointed
out in Figure A.1 in Section A.1. Information from the study are collected from a technical report
produced by ÅF-Infrastructure AB in December 2016.
Figure 4.1: Graphical image of Tändstickan and the analysed building T41, from (Carlsson, 2016).
The same building as in the technical report is analysed in the VBA script, in order to study the
applications of the program and see how the results differ. A simplified 2D model is used with the
purpose to simulate the building. Figure 4.2 and Figure 4.3 show the 𝑥-𝑧 elevation and the 𝑥-𝑦
elevation of the building and the representative 2D models.
←→
Figure 4.2: The model of T41 when ground motion in the 𝑦-direction is applied.
In order to model the foundation and the connection to the ground, rotational and horizontal springs
with varying stiffness are applied to the bottom node of the VBA model. Since only horizontal
movement is considered, no vertical springs are implemented to model the foundation properties in
the vertical direction.
4.1.1 Geometry
The analysed building is located south west in the neighbourhood Tändstickan. It has 16 levels and
the total building height is approximately 45 meters. The building consists of two separate parts,
however, analyses are only made on the smaller part. The analysed model, intended to represent the
plan view, is shown in Figure 4.4. The areas represent supporting walls, the outer walls consisting of
sandwich elements of concrete and insulation. The inner supporting walls are made of concrete. All
floors have the same thickness, about 0.3 meters, and consist of concrete as well.
The total area, as well as the moment of inertia in the x- and y-direction, are calculated and used as
inputs in the VBA script. Additionally, lumped masses, with the weight of each floor, are added to
the nodes.
In the technical report by ÅF-Infrastructure AB, a number of different ground motions were collected,
measured at various locations around the planned neighbourhood. In order to find the most critical
load, response spectra were carried out for each ground motion in every direction. Further, the
spectra were combined and the maximum amplitudes in each frequency were found in order to create
enveloped response spectra. Figure 4.5 and Figure 4.6 shows the enveloped total velocity response
spectra in the 𝑦-direction and the 𝑥-direction, respectively.
3
Maximum
2
1
0
0.1 1 10 100 1000
Natural frequency, 𝑓 [Hz]
3
Maximum
2
1
0
0.1 1 10 100 1000
Natural frequency, 𝑓 [Hz]
For the analysis performed with the VBA script, no enveloped velocity response spectra are calculated.
Instead, the structure is analysed with regard to the ground velocities having the largest amplitudes
in the two directions. Figure 4.7 shows the ground motions plotted as a function of time. For the
𝑦-direction, the ground motion is the same as in Figure A.2, repeated here for convenience.
⋅10−4 ⋅10−4
Ground[ velocity,
Ground[ velocity,
2 2
]
]
𝑣𝑔 m∕s
𝑣𝑔 m∕s
0 0
−2 −2
0 2 4 6 8 10 12 14 16 0 2 4 6 8 10 12 14 16
Time [s] Time [s]
(a) Ground velocity, 𝑦-direction (b) Ground velocity, 𝑥-direction
Figure 4.7: Ground motions, measured near the planned neighborhood Tändstickan in Gothenburg.
3
Maximum
0
0.1 1 10 100 1000
Natural frequency, 𝑓 [Hz]
Figure 4.8: Velocity response spectrum, 𝑦-direction. Created in the VBA script.
3
Maximum
0
0.1 1 10 100 1000
Natural frequency, 𝑓 [Hz]
Figure 4.9: Velocity response spectrum, 𝑥-direction. Created in the VBA script.
4.2 Results
In order to find a VBA model that corresponds to the FE model that was used in the analysis performed
by ÅF-Infrastructure AB, the natural frequencies of the first two bending modes of both models are
compared. The modes and the corresponding natural frequencies, for bending in both directions,
for the FE model are shown in Figure 4.10 and Figure 4.11. To get the same results for the VBA
model, the stiffness of the horizontal and the rotational spring are iterated until the frequencies are
considered close enough to the natural frequencies of the FE model. This is done for bending in
both the 𝑦-direction and the 𝑥-direction. For further studies, it is recommended to find a method
to calculate these values for a specific foundation. However, this is beyond the scope of this report
and for this analysis the iterated values are used to be able to compare the two analyses. The final
stiffness of the springs, along with the natural frequencies of the VBA model, are shown in Table 4.1.
The maximum values of the total comfort weighted RMS velocity in both directions are found. These
are compared to the responses presented in the report by ÅF-Infrastructure AB, see Table 4.2. The
difference term is calculated with regard to the previous analysis.
It is obviously a difference between the results, but with regard to the various simplifications of the
VBA model, the results are considered reasonable. In the FE analysis, the foundation and the piles
are included in the model, which most likely has an influence on the response. In the VBA model,
this is taken into account by adding springs to the bottom node, which only affects the stiffness of the
structure. It is also shown in Section 3.4.2 that there is a difference both between comfort weighted
responses from a THA and an RSA. Getting the same results from the two analyses is therefore not
expected. Additionally, the RMS factor used in the two analyses might not be the same, which also
affects the comfort weighted responses. Another factor that affects the results is the ground motion.
In the analysis performed by ÅF-Infrastructure AB, an enveloped load combination is used, which
means the worst case is found for every frequency. In the VBA script, only one specific load is used,
which may contribute to the fact that those results are smaller. Comparing the response spectra in
Figure 4.5 and 4.6 with the response spectra in Figure 4.8 and 4.9, it is clear that the peak values are
the same for both loads. However, the shape of the curves are not the same and it can be seen that the
enveloped load is larger for the rest of the frequencies.
The geometry implemented in the VBA script is another rough simplification of the reality. As
described in Section 4.1.1, the structural system of each the level is described as a box cross section
in the VBA script. From this cross section, the moment of inertia and the cross section area are
calculated, without any consideration to the openings, like windows and doors. This might have an
influence on the VBA results since it provides a stiffer and less conservative structure.
As mentioned in Section 1.2, the general aim of this master’s thesis is to develop a simplified
calculation program, which can be used to estimate the dynamical response of structures in the early
design phase. Since the intention is that the program should be used to get a rough estimation if a
more thorough analysis is required or not, the computational time is of great importance. For analyses
of structures like T41, the computational time consist of mainly two parts: the time it takes to design
the model and the actual running time of the analysis.
The time it takes to run an analysis is not always a reliable indicator, since it is highly dependant on
factors like the capacity of the computer and how many programs that are running simultaneously.
Therefore, the running times presented here should not be taken as definitive values. Instead, they
should provide a rough approximation of the computational effort of the two types of analyses.
According to ÅF-Infrastructure AB, the running time of the FE analysis was about ten hours. Addi-
tionally, the results were multiplied with an RMS factor and comfort weighted before the maximum
values could be found. In comparison, the running time of the VBA analysis is about two minutes for
each direction, which makes a total of four minutes to analyse the response in the 𝑥 and 𝑦-direction.
The results obtained from the VBA analysis are maximum values of comfort weighted RMS responses
in each DOF of the structure.
Through the various analyses presented in this thesis, it is shown that it is possible to use the developed
calculation program to get a rough estimation of the dynamical response of simple structures. Even
though the results may have a significant difference to results from more advanced analyses, the
program is considered to fulfill its desired purpose. It is proved that, for the studied structures, the
results generated by the VBA script are in the same range as results from time history analyses,
generated by ADINA. For these cases, it can therefore be assumed that the program may be used as a
complement to commercial FE programs, to tell if the dynamical responses will be close to current
regulations. However, it is not concluded whether the VBA script generates conservative results or
not. This varies throughout the analyses presented in this thesis and no relation to e.g. stiffness is
found.
In Chapter 4, the VBA script is used to analyse a real building, for which a full FE analysis previously
has been performed. Owing to the results, it is shown that even for this, relatively complex structure,
the VBA script generates reasonable results. The largest difference between the VBA results and
the results obtained by ÅF-Infrastructure AB is only about 50%. With regard to how simple the
analysis in the VBA script is compared to the FE analysis, the difference between the results is very
small, especially considering the time aspect. It take less than one hour to design the VBA model
and run the analysis, in comparison to the FE analysis which took more than six working days in
total. However, it is important to remember that these are the results from one specific analysis. It
is possible that the difference would be significantly larger for a different structure and a lot more
studies are required in order to draw a general conclusion.
In Section 3.2 it is shown that the VBA script and ADINA generate identical response spectra for
three different loads. Therefore, it is safe to assume that the principles of the method are correct.
However, it is important to remember that response spectrum analyses only provides estimations
of the responses and the results can never be expected to be exactly the same as from time history
analyses. From a THA, responses are generated for the whole time span, whereas an RSA only
provides the peak values for a specific frequency range. Further, when performing an RSA on an
MDOF system, additional errors are induced since the SDOF response need to be translated to an
MDOF response. With this in mind, the results shown in Section 3.3.3 are considered reasonable.
It can however be noticed that the errors are larger for the total response than the relative response,
which shows that the ground motion might not be correctly included.
As mentioned in Section 3.4 and Section 3.6, there are still some questions regarding the principles
of RMS and comfort weighting of vibrations. More research and studies are required in this subject
When studying the results of the analyses in the thesis, it is important to take into account the
various simplifications and limitations of the VBA program. Some of which are already mentioned
in Section 1.4. One important limitation is the fact that the foundations and its transfer of vibrations
is not considered. For example, for the building analysed in Chapter 4, the foundation and the piles
are assumed to have a significant influence on the responses. As mentioned, the stiffness contribution
is considered by adding rotational and horizontal springs, but the fact that the ground motion actually
is transferred through the piles is not taken into account in the VBA script. This is assumed to induce
some errors in the results, which need to be kept in mind when analysing structures with various
foundation conditions.
Since the purpose of the thesis is to develop a simplified calculation program, where dynamical
analyses can be performed rather easy, there are lots of simplifications, which of course induces
errors. Some of which are related to the models, for example the column model with the purpose to
simulate multi-storey buildings. This model is designed in such way that only one beam element is
used to describe the response of each floor. In Section 3.3.1 it was proved that in order to get reliable
results, a number of 16 elements would be required. It is therefore obvious that parts of the errors
between the RSA and the THA results for the building analyses can be related to this. However,
This study aims to investigate how to predict comfort disturbing vibrations in buildings. Throughout
the work, a calculation program is developed in Visual Basic for Applications (VBA). During the
development of the program, several analyses and verifications are made and the results are compared
to results from the commercial finite element (FE) program ADINA. In this section, a summary of
the most essential analyses are presented.
Response spectra are plots consisting of peak responses for a wide range of single degree of freedom
(SDOF) systems. These types of plots can be generated by the developed calculation program and the
results are verified. When comparing response spectra created with the VBA program and response
spectra created with ADINA, only small differences can be seen. The equivalence is independent of
the complexity of the load, i.e. if the load has a sinus shape or a more irregular distribution. The
results are found in Section 3.2.2 and Section 3.2.3.
In order to study the accuracy of the program, response spectrum analyses are performed in both the
VBA program and ADINA. Two simply supported beams, with different lengths, are studied and the
total responses (total acceleration, total velocity and total displacement) are calculated with response
spectrum analysis (RSA) with both the VBA script and with ADINA. The responses calculated with
the programs differ with 0.6% − 1.6%. To check the equivalence of the created models, the first mode
frequencies of the beams are studied as well, which from the two programs differ with 0.1%. The
results are found in Section 3.3.2.
Time history analysis (THA) is the most common method to use today when analysing the dynamic
response of buildings. Such analysis provides a full response history and therefore describes the
exact behaviour of a system. To study RSA in comparison to THA a number of simply supported
beams with varying stiffness and mass are studied and the maximum acceleration (relative and total)
in three different positions along the beams are calculated with RSA in the VBA script and with THA
in ADINA.
The relative accelerations calculated with the VBA script is very similar to the accelerations from
ADINA. The acceleration of the mid node differs with 0.1% − 10.9% and the accelerations of the two
other studied nodes differ with 0.6% − 6.2% and 0.1% − 2.0%, respectively. The results are found in
Section 3.3.3.1.
Eight simply supported beams are studied with two different approaches to weight the signal in the
VBA script with regard to comfort weighting. The total acceleration in three different positions
along the beam are studied. The approach that generates the results considered most reliable gives
results that differs with 1.7% − 31.0% in comparison to a THA from ADINA, for the mid node. The
acceleration in the other studied nodes differ with 1.9% − 86.6% and 4.3% − 33.7%, respectively,
compared to the results generated with ADINA. The results are found in Section 3.4.2.
The resemblance between a 2D frame model, modelled in ADINA, and a cantilever beam with lumped
masses, modelled in the VBA script, is studied with regard to the natural frequencies. First, the
influence of floor span is studied, where three different ADINA models are analysed. The natural
frequencies of the models in ADINA and the VBA script differ with 0.19%, at most.The results are
found in Section 3.5.1.
Further, natural frequencies of three ADINA models, representing buildings of different sizes, are
compared to the natural frequencies of corresponding VBA models (cantilever with lumped masses).
The natural frequencies of all models differ with 0.2%. The results are found in Section 3.5.2.
A simple MDOF system, a six storey building with two spans, is analysed with the final VBA program
and the results (total velocities) are compared to results from a THA in ADINA. Both comfort
weighted responses and unweighted responses are studied. The differences between the analyses
of the weighted response are maximum 49.4% and for the unweighted response the differences are
maximum 22.3%. The results are found in Section A.2.
The VBA script is used to analyse a residential building that is to be built in Gothenburg, which has
already been analysed by ÅF-Infrastructure AB, using advanced FE analyses. The difference in the
results generated from the two methods is 51.1% for the weak direction of the building and 16.8% for
the stiffer direction. The results are found in Section 4.2.
Throughout the analyses it is shown that it is possible, through the VBA script, to get a rough
estimation of the dynamical response of a simple building subjected to a ground motion. However,
the program generates results that are not consistently conservative. Therefore, it can not be concluded
that the results are always on the safe side. Because of this, the results should be regarded as indicators
only and not as response values to be designed for. The script should be used to roughly estimate if a
building is at risk of evolving vibrational problems with regard to comfort. If this is the case, further,
and more advanced, analyses are needed.
The script uses RSA to estimate the responses of structures subjected to a ground motion, a method
commonly used in earthquake engineering. Throughout the work, problems on how to include the
ground motion in the response spectra, to get the total response, were discovered. The way the ground
motion is included in the final version of the program need to be evaluated further. However, since it
is concluded that the program generates results that can be used to estimate the dynamical response,
it can also be concluded that RSA is an applicable method for prediction of comfort disturbing
vibrations in buildings.
As can be read in Section 6.1, the results from the VBA script differ slightly from the results generated
from the time history analyses in ADINA. Therefore, additional studies are needed to further verify
the method of the VBA program, before it can be used in practice.
As discussed in Section 5 there are uncertainties regarding the way the program handles comfort
weighting. In order to be able to compare the results to current regulations, it is essential to be able
to weight the generated signal with regard to comfort in a correct way. It can therefore be concluded
that further studies on how to include comfort weighting are needed.
As mentioned in Section 3.3.3.2, further studies is needed to investigate whether there is a better
and more correct way of including the ground motion in the response spectrum or not. The way the
ground motion is included in the final version of the VBA script induces errors that will, unavoidably,
affect the result. Additional literature studies in the subject are required in order to find a solution
that gives less errors.
In the final VBA script, it is possible to set the input ground motion as a ground acceleration or a
ground velocity. Due to the problems described in Section 3.2.1, it is not possible to get a response
spectrum of the total velocity if the ground motion is an acceleration. Further studies how to integrate
the acceleration in a correct manner and calculate the initial velocity in a general way, need to be
performed.
When measuring a ground motion it is possible, through a software, to get comfort weighted values
at once. In further studies these comfort weighted values could be compared to the values weighted
with Approach 2, described in Section 3.4.2, to see the resemblance. If the results differ, Approach 2
need to be developed further.
In the script, the signals are converted from the time domain to the frequency domain to be able
to use the correct weighting factors. Investigation on how to comfort weight a signal in the time
To study the applications of the complete VBA script, a full analysis is performed for one of the
structures described in Section 3.5.2, see Figure 3.39. For repetition, the geometry is described in
Table A.1. For this analysis, the damping ratio is defined as 5% and the applied load is a velocity,
applied as a ground motion in the horizontal direction. The motion is measured at Almedalsvägen in
Gothenburg, Figure A.1 shows the location. The graph in Figure A.2 shows the velocity plotted as a
function of time. The total horizontal velocity (ground velocity and relative velocity) is calculated
with RSA in the VBA script and with THA in ADINA. To see how the response vary along the height
of the structure, the total velocity in node 2 to 7 in Figure A.3c is studied.
Figure A.1: Location where the velocity ground motion is measured. Image from Apple Maps.
⋅10−4
Ground[ velocity,
2
]
𝑣𝑔 m∕s
−2
0 2 4 6 8 10 12 14 16
Time [s]
Figure A.2: Ground velocity measured at Almedalsvägen in Gothenburg.
A.2 Results
Studies are performed to obtain both the unweighted total response and the comfort weighted total
RMS response in each node. For both analyses, the error term in the tables represents the difference
between the responses with respect to the time history analyses. The results for the unweighted
response are shown in Table A.2. The difference between the analyses seems reasonable owing to
the results shown in Section 3.3.3.3.
Table A.2: Total velocity of analysed MDOF system. Unweighted response.
Total velocity, RSA Total velocity, THA
Node Error
𝑣𝑅𝑆𝐴 [mm/s] 𝑣𝑇 𝐻𝐴 [mm/s]
2 0.263 0.339 -22.3%
3 0.283 0.355 -20.3%
4 0.221 0.248 -11.2%
5 0.227 0.193 17.6%
6 0.276 0.317 -12.8%
7 0.256 0.260 -1.5%
The comfort weighted response is shown in Table A.3. It is clear that ratios between the RSA and
THA results are not the same as in Table A.2, and hence it can be concluded that the approach of
comfort weighting does not work exactly the same for the two types of analyses. This is also proved
if comparing the results in Section 3.3.3.3 with the results in Section 3.4.2. Therefore, it seems
reasonable that there is a considerable difference between the RSA and the THA results.
Table A.3: Total velocity of analysed MDOF system. Comfort weighted response.
Total velocity, RSA Total velocity, THA
Node Error
𝑣𝑅𝑆𝐴 [mm/s] 𝑣𝑇 𝐻𝐴 [mm/s]
2 0.0966 0.140 -31.0%
3 0.0811 0.160 -49.4%
4 0.0861 0.114 -24.6%
5 0.0611 0.112 -45.5%
6 0.0954 0.140 -32.0%
7 0.0702 0.123 -42.8%
This appendix includes the data from which the graphs in Figure 3.18, 3.19 and 3.20 in Section 3.3.3.3
are plotted.
Table B.1: Comparison of total acceleration from RSA and THA, node A.
Total acceleration (Node A),
𝑎𝑡𝑜𝑡 [mm/s2 ]
Analysis RSA (from VBA script) THA (from ADINA) Error
1 8.86 7.90 12.2%
2 17.47 19.15 -8.8%
3 35.02 36.06 -2.9%
4 49.39 50.66 -2.5%
5 20.31 16.13 25.9%
6 19.10 15.48 23.4%
7 18.76 14.57 28.8%
8 24.86 21.43 16.0%
9 11.94 10.43 14.5%
10 9.78 10.83 -9.7%
11 53.88 56.12 -3.4%
12 25.53 23.91 6.8%
13 20.33 16.93 20.1%
14 38.48 35.02 9.9%
15 24.30 18.77 29.5%
16 20.87 15.82 31.9%
Table B.2: Comparison of total acceleration from RSA and THA, node B.
Total acceleration (Node B),
𝑎𝑡𝑜𝑡 [mm/s2 ]
Analysis RSA (from VBA script) THA (from ADINA) Error
1 6.28 5.19 21.0%
2 12.36 12.11 2.1%
3 24.76 25.08 -1.3%
4 34.92 34.10 2.4%
5 14.36 14.87 -3.4%
6 13.50 13.52 -0.2%
7 13.26 13.40 -1.0%
8 17.58 18.19 -3.4%
9 8.44 7.21 17.0%
10 6.92 5.38 28.7%
11 38.10 38.61 -1.3%
12 18.05 18.33 –1.5%
13 14.38 14.64 -1.8%
14 27.21 26.75 1.7%
15 17.18 17.92 -4.1%
16 14.76 15.43 -4.3%
In the calculation sheet, originally written by Sound & Vibrations at ÅF-Infrastructure AB, a signal in
the frequency domain need to be inserted. The signal is inserted into two columns, one for frequency
and one for the magnitude of the response corresponding to each frequency, see Table C.1. Further,
the signal is plotted, see Figure C.1.
⋅10−3
1.5
Magnitude
0.5
0
0 10 20 30 40 50 60 70 80 90
Frequency [Hz]
If the signal to be analysed is in time domain, an FFT of the signal need to be done first. When
inserted, the signal is divided with regard to one-third-octave bands, where each band corresponds
to a specific frequency range. The magnitudes of the responses belonging to each one-third-octave
band are summed up, and a table with the magnitude in each one-third-octave band is automatically
written, see Table C.2
The desired RMS factor also need to be an input in the sheet. The factor is multiplied with all the
magnitude values in Table C.2. Further, the magnitude values are multiplied with weighting factors
corresponding to each frequency. The weighting factors can be found in Table 2.2. Finally, the
√
𝑎𝑐𝑜𝑚𝑓 = (𝑊𝑚.1 ⋅ 𝑎1 )2 + (𝑊𝑚.1.25 ⋅ 𝑎1.25 )2 + ... + (𝑊𝑚.80 ⋅ 𝑎80 )2
√
𝑣𝑐𝑜𝑚𝑓 = (𝑊𝑚.1 ⋅ 𝑣1 )2 + (𝑊𝑚.1.25 ⋅ 𝑣1.25 )2 + ... + (𝑊𝑚.80 ⋅ 𝑣80 )2
where 𝑊𝑚.1 , 𝑊𝑚.1.25 ...𝑊𝑚.80 are the weighting factors to the corresponding one-third-octave band,
according to Table 2.2. 𝑎1 , 𝑎1.25 ...𝑎80 are the acceleration responses in each one-third-octave band
and 𝑣1 , 𝑣1.25 ...𝑣80 are the velocity responses.
\ textsmall
Option Base 1
Sub B e a m _ c a n t i l e v e r ( )
If _
MsgBox ( " Would␣ you ␣ l i k e ␣ t o ␣ i n c l u d e ␣ c o m f o r t ␣ w e i g h t i n g ? " , vbYesNo , " " ) _
= vbYes Then
RMS_comf = 1
S h e e t s ( " Beam␣ S i m p l y ␣ S u p p o r t e d " ) . C e l l s ( 2 2 , 4 ) _
= " Responses ␣ comfort ␣ weighted "
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 2 2 , 4 ) =
" Responses ␣ comfort ␣ weighted "
Else
RMS_comf = 0
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 2 2 , 4 ) =
" R e s p o n s e s ␣NOT␣ c o m f o r t ␣ w e i g h t e d "
End I f
’−−−−−−−−−−−−−−−−−−−−−−−−MPF−−−−−−−−−−−−−−−−−−−−−−’
’ Read i n p u t v a l u e s
’ Young ’ s m o d u l o s
E = S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 1 0 , 5 ) . V a l u e
’ Cross s e c t i o n area
Area = S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 8 , 5 ) . V a l u e
’ Moment i f i n e r t i a
i n e r t i a = S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 9 , 5 ) . V a l u e
’ Density
d e n s i t y = S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 7 , 5 ) . V a l u e
’ Mass p e r m e t e r
mass = Area ∗ d e n s i t y
’ S t i f f n e s s o f ground ( modelled as a s p r i n g )
K _ g r o u n d _ r o t = S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 1 2 , 5 ) . V a l u e
K _ g r o u n d _ h o r = S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 1 3 , 5 ) . V a l u e
’ Defining pi
’ Clear output c e l l s
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . Range ( " E16 : G18 " ) . C l e a r C o n t e n t s
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . Range ( " V26 : EZ600 " ) . C l e a r C o n t e n t s
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . Range ( " U33 : U174 " ) . C l e a r C o n t e n t s
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . Range ( " B26 : F500 " ) . C l e a r C o n t e n t s
’ D e f i n i n g number o f DOF
n _ d o f = ( S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 3 , 5 ) . V a l u e + 1 ) ∗ 3
’ D e f i n i n g number o f z e r o s
n _ z e r o s = S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 4 , 5 ) . V a l u e
’ D e f i n i n g number o f r e d u c e d DOF
n_dof_red = n_dof − n_zeros
’ D e f i n i n g v e c t o r s w i t h a l l DOFS , a c t i v e DOFS ,
’ s u p p o r t DOFS and lumped mass
Dim DOFS ( )
ReDim P r e s e r v e DOFS ( n_dof , 1 )
Dim a c t i v e ( )
ReDim P r e s e r v e a c t i v e ( n_dof , 1 )
Dim s u p p o r t ( )
ReDim P r e s e r v e s u p p o r t ( n_dof , 1 )
Dim l u m p e d _ m as s _p o s ( )
ReDim P r e s e r v e l um p e d_ m as s _p o s ( n_dof , 1 )
For i = 1 To n _ d o f
BC = S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( i + 2 , 1 4 ) . V a l u e
I f BC = " " Then
a c t i v e ( i , 1) = i
Else
support ( i , 1) = i
End I f
DOFS ( i , 1 ) = S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( i + 2 , 1 0 ) . V a l u e
Next i
j = 1
Dim a c t i v e _ D O F _ l o n g ( )
ReDim P r e s e r v e a c t i v e _ D O F _ l o n g ( n_dof , 1 )
For i = 1 To n _ d o f
I f a c t i v e ( i , 1 ) <> " " Then
active_DOF_long ( j , 1) = a c t i v e ( i , 1)
j = j + 1
End I f
Next i
For i = 1 To UBound ( a c t i v e _ D O F )
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 3 2 + i , 2 1 ) . V a l u e = _
"DOF : " & a c t i v e _ D O F ( i , 1 )
Next i
j = 1
Dim s u p p o r t _ D O F _ l o n g ( )
ReDim P r e s e r v e s u p p o r t _ D O F _ l o n g ( n_dof , 1 )
For i = 1 To n _ d o f
I f s u p p o r t ( i , 1 ) <> " " Then
support_DOF_long ( j , 1) = s u p p o r t ( i , 1)
j = j + 1
End I f
Next i
Dim support_DOF ( )
ReDim P r e s e r v e support_DOF ( j − 1 , 1 )
For i = 1 To j − 1
support_DOF ( i , 1 ) = s u p p o r t _ D O F _ l o n g ( i , 1 )
Next i
’ D e f i n e m a t r i x f o r mass
Dim m( )
ReDim P r e s e r v e m( n_dof , n _ d o f )
For i = 1 To n _ d o f
For j = 1 To n _ d o f
m( i , j ) = 0
Next j
Next i
’ D e f i n e m a t r i x f o r lumped mass
Dim m_lumped ( )
ReDim P r e s e r v e m_lumped ( n_dof , n _ d o f )
For i = 1 To n _ d o f
For j = 1 To n _ d o f
I f m_lumped ( i , j ) = " " Then
m_lumped ( i , j ) = 0
Else
End I f
Next j
Next i
’ Define boundary c o n d i t i o n s
Dim b ( )
ReDim P r e s e r v e b ( n _ z e r o s , 1 )
b = support_DOF
’ D e f i n e e d o f −m a t r i x
Dim e d o f ( )
ReDim P r e s e r v e e d o f ( n _ e l e m e n t s , 7 )
For j = 1 To n _ e l e m e n t s
For i = 2 To 4
edof ( j , 1) = j
e d o f ( j , i ) = DOFS ( ( i − 1 ) + 3 ∗ ( j − 1 ) , 1 )
e d o f ( j , i + 3 ) = DOFS ( i + 2 + 3 ∗ ( j − 1 ) , 1 )
’ Define geometry
’ x− c o o r d i n a t e s
Dim ex ( )
ReDim P r e s e r v e ex ( n _ e l e m e n t s , 2 )
For j = 1 To n _ e l e m e n t s
ex ( j , 1 ) = ( j − 1 ) ∗ l e n g t h _ e
ex ( j , 2 ) = ( j ) ∗ l e n g t h _ e
Next j
’ y− c o o r d i n a t e s
Dim ey ( )
ReDim P r e s e r v e ey ( n _ e l e m e n t s , 2 )
For j = 1 To n _ e l e m e n t s
ey ( j , 1 ) = 0
ey ( j , 2 ) = 0
Next j
’ A s s e m b l y s t i f f n e s s and mass m a t r i x
For i = 1 To n _ e l e m e n t s
Ke = Beam2d . Beam2d ( ex , ey , epd , " Ke " , i )
I f i = 1 Then
Ke ( 3 , 3 ) = Ke ( 3 , 3 ) + K _ g r o u n d _ r o t
Ke ( 2 , 2 ) = Ke ( 2 , 2 ) + K _ gr o u n d _ h o r
End I f
k = Assem . Assem ( e d o f , k , Ke , 0 , 0 , i , 1 )
M_e = Beam2d . Beam2d ( ex , ey , epd , "Me" , i )
m = Assem . Assem ( e d o f , m, M_e , 0 , 0 , i , 1 )
Next i
For i = 1 To n _ d o f
For j = 1 To n _ d o f
m( i , j ) = m( i , j ) + m_lumped ( i , j )
Next j
’ C a l c u l a t e r− v e c t o r
’ p a r t i t i o n a t e d k−m a t r i x
Dim k _ p a r t ( )
ReDim P r e s e r v e k _ p a r t ( n_dof , n _ d o f )
’ Order o f DOFS a f t e r p a r t i t i o n i n g
Dim p a r t _ o r d e r ( )
ReDim P r e s e r v e p a r t _ o r d e r ( n_dof , 1 )
For i = 1 To UBound ( a c t i v e _ D O F )
p a r t _ o r d e r ( i , 1) = active_DOF ( i , 1)
Next i
For i = ( UBound ( a c t i v e _ D O F ) + 1 ) To n _ d o f
p a r t _ o r d e r ( i , 1 ) = support_DOF ( i − UBound ( a c t i v e _ D O F ) , 1 )
Next i
For i = 1 To n _ d o f
For j = 1 To n _ d o f
k_part ( j , i ) = k( part_order ( j , 1) , part_order ( i , 1))
Next j
Next i
’−−−−−−−−−−−−−−−−R−v e c t o r −−−−−−−−−−−−−−−−−−−−−−−−−−’
Dim Knnd ( )
ReDim P r e s e r v e Knnd ( UBound ( a c t i v e _ D O F ) , UBound ( a c t i v e _ D O F ) )
For i = 1 To UBound ( a c t i v e _ D O F )
For j = 1 To UBound ( a c t i v e _ D O F )
Knnd ( j , i ) = k _ p a r t ( j , i )
Next j
Next i
Dim Knsd ( )
ReDim P r e s e r v e Knsd ( UBound ( a c t i v e _ D O F ) , UBound ( support_DOF ) )
For i = 1 To UBound ( support_DOF )
For j = 1 To UBound ( a c t i v e _ D O F )
Knsd ( j , i ) = k _ p a r t ( j , UBound ( a c t i v e _ D O F ) + i )
Next j
Next i
Dim Ksnd ( )
ReDim P r e s e r v e Ksnd ( UBound ( support_DOF ) , UBound ( a c t i v e _ D O F ) )
For i = 1 To UBound ( a c t i v e _ D O F )
For j = 1 To UBound ( support_DOF )
Dim Kssd ( )
ReDim P r e s e r v e Kssd ( UBound ( support_DOF ) , UBound ( support_DOF ) )
For i = 1 To UBound ( support_DOF )
For j = 1 To UBound ( support_DOF )
Kssd ( j , i ) = k _ p a r t ( j + UBound ( a c t i v e _ D O F ) , i + UBound ( a c t i v e _ D O F ) )
Next j
Next i
Dim Knnd_inv_neg ( )
Dim r ( )
ReDim P r e s e r v e r ( n_dof , UBound ( support_DOF ) )
Knnd_inv = A p p l i c a t i o n . M I n v e r s e ( Knnd )
Knnd_inv_neg = M a t r i x . M_PROD_S( Knnd_inv , −1)
r = A p p l i c a t i o n . MMult ( Knnd_inv_neg , Knsd )
Dim r x ( )
ReDim P r e s e r v e r x ( n _ d o f _ r e d , 1 )
For j = 1 To n _ d o f _ r e d
rx ( j , 1) = r ( j , 1)
Next j
Dim r y ( )
ReDim P r e s e r v e r y ( n _ d o f _ r e d , 1 )
I f n _ z e r o s > 1 Then
For j = 1 To n _ d o f _ r e d
ry ( j , 1) = r ( j , 2)
Next j
Else
For n = 1 To UBound ( r y )
ry ( n , 1) = 0
Next n
For n = 1 To n _ e l e m e n t s + 1
ry (1 + 3 ∗ ( n − 1) , 1) = 1
Next n
End I f
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’ C a l c u l a t e f r e q u e n c i e s and modal m a t r i x
MOutput = M o d a l A n a l y s i s . M o d a l A n a l y s i s (M2, K2 )
f = MOutput ( 1 )
P h i = MOutput ( 2 )
’ C a l c u l a t e sum o f e a c h v e c t o r i n P h i
Dim norm_Phi ( )
ReDim P r e s e r v e norm_Phi ( n _ d o f _ r e d , 1 )
Dim phi_sum ( )
ReDim P r e s e r v e phi_sum ( n _ d o f _ r e d , 1 )
’ S c a l e e i g e n v e c t o r s , n o r m a l i z e l e n g t h o f e a c h v e c t o r =1
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
value_squared = ( Phi ( j , i ) ^ 2)
phi_sum ( i , 1 ) = phi_sum ( i , 1 ) + v a l u e _ s q u a r e d
Next j
norm_Phi ( i , 1 ) = Sqr ( phi_sum ( i , 1 ) )
Next i
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
P h i _ s c a l e d ( j , i ) = P h i ( j , i ) / norm_Phi ( i , 1 )
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 3 2 + j , 21 + i ) . V a l u e = P h i _ s c a l e d ( j , i )
Next j
Next i
’−−−−−Check i f t h e e q u a t i o n ( K−omega ^ 2 M) P h i =0’’−−−−−−−−−’
Dim DD( )
ReDim P r e s e r v e DD( n _ d o f _ r e d , n _ d o f _ r e d )
Dim P h i _ s c a l e d _ v e c t o r ( )
ReDim P r e s e r v e P h i _ s c a l e d _ v e c t o r ( n _ d o f _ r e d , 1 )
Dim omega2_m2 ( )
ReDim P r e s e r v e omega2_m2 ( n _ d o f _ r e d , 1 )
Dim z e r o _ m a t r i x ( )
ReDim P r e s e r v e z e r o _ m a t r i x ( n _ d o f _ r e d , n _ d o f _ r e d )
Dim z e r o _ v e c t o r ( )
ReDim P r e s e r v e z e r o _ v e c t o r ( n _ d o f _ r e d , 1 )
’ M u l t i p l y i n g M−m a t r i x w i t h omega ^2
For nn = 1 To n _ d o f _ r e d
’K−omega ^ 2 M
DD( i , j ) = K2 ( i , j ) − omega2_m2 ( i , j )
P h i _ s c a l e d _ v e c t o r ( j , 1) =
P h i _ s c a l e d ( j , nn )
Next j
Next i
z e r o _ v e c t o r = A p p l i c a t i o n . MMult (DD, P h i _ s c a l e d _ v e c t o r )
For n = 1 To n _ d o f _ r e d
z e r o _ m a t r i x ( n , nn ) = z e r o _ v e c t o r ( n , 1 )
Next n
Next nn
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 1 2 5 + j , 21 + i ) . V a l u e = _
zero_matrix ( j , i )
Next j
Next i
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
I f Abs ( z e r o _ m a t r i x ( j , i ) ) < 0 . 0 1 Then
Else
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 1 2 6 _
+ UBound ( z e r o _ m a t r i x ) , 21 + i ) = "WRONG! "
End I f
Next j
Next i
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
I f Abs ( z e r o _ m a t r i x ( j , i ) ) < 0 . 0 0 1 Then
Else
MsgBox "ERROR : ␣ (K−omega ^2∗M) P h i ␣ n o t ␣ z e r o ! " , v b C r i t i c a l
E x i t Sub
End I f
Next j
Next i
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’ Transpose Phi m a t r i x
’ D e f i n i n g v e c t o r s f o r c a l c u l a t i n g modal p a r t i c i p a t i o n f a c t o r
Dim p h i t _ m _ r ( )
ReDim P r e s e r v e p h i t _ m _ r ( 1 , 1 )
Dim p h i t _ m _ p h i ( )
ReDim P r e s e r v e p h i t _ m _ p h i ( 1 , 1 )
Dim GAMMA_vector ( )
ReDim P r e s e r v e GAMMA_vector ( n _ d o f _ r e d , 1 )
’ Modal p a r t i c i p a t i o n f a c t o r s
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
smallphi_t (1 , j ) = phi_t ( i , j ) ’ Modal v e c t o r , 1 x n _ f l o o r s
smallphi ( j , 1) = phi_t ( i , j ) ’ Modal v e c t o r , n _ f l o o r s x 1
Next j
’ N u m e r a t o r f o r MPPF
p h i t _ m _ r y = A p p l i c a t i o n . MMult ( s m a l l p h i _ t , m_ry )
m_phi = A p p l i c a t i o n . MMult (M2, s m a l l p h i )
’ D e n o m i n a t o r f o r MPPF
p h i t _ m _ p h i = A p p l i c a t i o n . MMult ( s m a l l p h i _ t , m_phi )
phit_m_phi_inv = A p p l i c a t i o n . MInverse ( phit_m_phi )
’ Modal p a r t i c i p a t i o n f a c t o r
Gamma = A p p l i c a t i o n . MMult ( p h i t _ m _ r y , p h i t _ m _ p h i _ i n v )
GAMMA_vector ( i , 1 ) = Gamma ( 1 )
’ O u t p u t MPPF and f r e q u e n c i e s
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 2 7 , 21 + i ) . V a l u e = Gamma
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 3 0 , 21 + i ) . V a l u e = f ( i , 1 )
Next i
Dim a _ R S _ i n t e r p o l ( )
ReDim P r e s e r v e a _ R S _ i n t e r p o l ( n _ d o f _ r e d , 1 )
Dim v _ R S _ i n t e r p o l ( )
ReDim P r e s e r v e v _ R S _ i n t e r p o l ( n _ d o f _ r e d , 1 )
’−−−−−−−−−−− R e s p o n s e s p e c t r u m −−−−−−−−−−−−−−−−−−−−−−’
’ Read i f t h e l o a d i s an a c c e l e r a t i o n o r a v e l o c i t y
choice = Sheets ( " Input " ) . C e l l s (5 , 12)
’ num=1 g i v e s m a t r i x w i t h f r e q , a_max ,
’ a _ r e l , v _ r e l and d _ r e l ( and i f c h o i c e =0 , a l s o v_max )
output_RS = Response_spectrum . Response_spectrum ( 1 )
Dim f r e q ( )
ReDim P r e s e r v e f r e q ( UBound ( o u t p u t _ R S ) , 1 )
Dim a_max ( )
ReDim P r e s e r v e a_max ( UBound ( o u t p u t _ R S ) , 1 )
Dim a _ r e l ( )
ReDim P r e s e r v e a _ r e l ( UBound ( o u t p u t _ R S ) , 1 )
Dim v _ r e l ( )
ReDim P r e s e r v e v _ r e l ( UBound ( o u t p u t _ R S ) , 1 )
Dim d _ r e l ( )
ReDim P r e s e r v e d _ r e l ( UBound ( o u t p u t _ R S ) , 1 )
I f c h o i c e = 0 Then
Dim v_max ( )
ReDim P r e s e r v e v_max ( UBound ( o u t p u t _ R S ) , 1 )
End I f
For i = 1 To UBound ( o u t p u t _ R S )
f r e q ( i , 1) = output_RS ( i , 1)
a_max ( i , 1 ) = o u t p u t _ R S ( i , 2 )
a _ r e l ( i , 1) = output_RS ( i , 4)
v _ r e l ( i , 1) = output_RS ( i , 5)
d _ r e l ( i , 1) = output_RS ( i , 6)
I f c h o i c e = 0 Then
v_max ( i , 1 ) = o u t p u t _ R S ( i , 3 )
End I f
Next i
n _ s t e p s = output_RS (1 , 7)
I f f ( 1 , 1 ) > f r e q ( 1 , 1 ) Then
Else
MsgBox _
" A d j u s t ␣ f r e q u e n c y ␣ r a n g e ␣ f o r ␣RS . ␣ The ␣ l o w e r
l i m i t ␣ i s ␣ too ␣ high ! " , vbCritical
End I f
’ P o s i t i o n i n f r e q u e n c y v e c t o r from
’ RS ( x− v a l u e s ) , where t h e e i g e n f r e q u e n c i e s i s f o u n d
Dim f r e q _ p o s ( )
ReDim P r e s e r v e f r e q _ p o s ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
j = 0
’ I n t e r p o l a t e t h e r e s p o n s e s from r e s p o n s e s p e c t r a
’ for the frequencies of the structure
’ Total acceleration
Dim g r a d _ a ( )
ReDim P r e s e r v e g r a d _ a ( n _ d o f _ r e d , 1 )
Dim y _ s t a r t _ a ( )
ReDim P r e s e r v e y _ s t a r t _ a ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
z = freq_pos ( i , 1)
’ C a l c u l a t e s t h e g r a d i e n t t o be a b l e t o i n t e r p o l a t e
g r a d _ a ( i , 1 ) = ( a_max ( z , 1 ) − a_max ( z − 1 , 1 ) ) / _
( fre q ( z , 1) − freq ( z − 1 , 1) )
y _ s t a r t _ a ( i , 1 ) = a_max ( z , 1 ) − g r a d _ a ( i , 1 ) ∗ f r e q ( z , 1 )
’ G i v e s t h e i n t e r p o l a t e d v a l u e f o r a c c e l e r a t i o n i n t h e RS
a_RS_interpol ( i , 1) = grad_a ( i , 1) ∗ f ( i , 1) + y _ s t a r t _ a ( i , 1)
’ Relative acceleration
Dim a _ R S _ i n t e r p o l _ r e l ( )
ReDim P r e s e r v e a _ R S _ i n t e r p o l _ r e l ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
z = freq_pos ( i , 1)
’ C a l c u l a t e s t h e g r a d i e n t t o be a b l e t o i n t e r p o l a t e
grad_a ( i , 1) = ( a _ r e l ( z , 1) − a _ r e l ( z − 1 , 1) ) / _
( fre q ( z , 1) − freq ( z − 1 , 1) )
y _ s t a r t _ a ( i , 1) = a _ r e l ( z , 1) − grad_a ( i , 1) ∗ freq ( z , 1)
’ G i v e s t h e i n t e r p o l a t e d v a l u e f o r a c c e l e r a t i o n i n t h e RS
a _ R S _ i n t e r p o l _ r e l ( i , 1) = grad_a ( i , 1) ∗ f ( i , 1) + y _ s t a r t _ a ( i , 1)
Next i
I f c h o i c e = 0 Then
’ Total velocity
Dim g r a d _ v ( )
ReDim P r e s e r v e g r a d _ v ( n _ d o f _ r e d , 1 )
Dim y _ s t a r t _ v ( )
ReDim P r e s e r v e y _ s t a r t _ v ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
z = freq_pos ( i , 1)
’ C a l c u l a t e s t h e g r a d i e n t t o be a b l e t o i n t e r p o l a t e
g r a d _ v ( i , 1 ) = ( v_max ( z , 1 ) − v_max ( z − 1 , 1 ) ) / _
( fre q ( z , 1) − freq ( z − 1 , 1) )
y _ s t a r t _ v ( i , 1 ) = v_max ( z , 1 ) − g r a d _ v ( i , 1 ) ∗ _
freq ( z , 1)
’ G i v e s t h e i n t e r p o l a t e d v a l u e f o r v e l o c i t y i n t h e RS
v_RS_interpol ( i , 1) = grad_v ( i , 1) ∗ f ( i , 1) + _
y _ s t a r t _ v ( i , 1)
Next i
End I f
’ Relative velocity
Dim g r a d _ v _ r e l ( )
ReDim P r e s e r v e g r a d _ v _ r e l ( n _ d o f _ r e d , 1 )
Dim y _ s t a r t _ v _ r e l ( )
ReDim P r e s e r v e y _ s t a r t _ v _ r e l ( n _ d o f _ r e d , 1 )
Dim v _ R S _ i n t e r p o l _ r e l ( )
ReDim P r e s e r v e v _ R S _ i n t e r p o l _ r e l ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
z = freq_pos ( i , 1)
’ C a l c u l a t e s t h e g r a d i e n t t o be a b l e t o i n t e r p o l a t e
’ Relative displacement
Dim g r a d _ d _ r e l ( )
ReDim P r e s e r v e g r a d _ d _ r e l ( n _ d o f _ r e d , 1 )
Dim d _ R S _ i n t e r p o l _ r e l ( )
ReDim P r e s e r v e d _ R S _ i n t e r p o l _ r e l ( n _ d o f _ r e d , 1 )
Dim y _ s t a r t _ d _ r e l ( )
ReDim P r e s e r v e y _ s t a r t _ d _ r e l ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
z = freq_pos ( i , 1)
’ C a l c u l a t e s t h e g r a d i e n t t o be a b l e t o i n t e r p o l a t e
grad_d_rel ( i , 1) = ( d_rel ( z , 1) − d_rel ( z − 1 , 1 )) / _
( f req ( z , 1) − freq ( z − 1 , 1 ))
y _ s t a r t _ d _ r e l ( i , 1) = d_rel ( z , 1) − grad_d_rel ( i , 1) ∗ _
freq ( z , 1)
’ G i v e s t h e i n t e r p o l a t e d v a l u e f o r d i s p l a c e m e n t i n t h e RS
d_RS_interpol_rel ( i , 1) = grad_d_rel ( i , 1) ∗ f ( i , 1) _
+ y _ s t a r t _ d _ r e l ( i , 1)
Next i
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
R M S _ f a c t o r s = RMS.RMS( RMS_comf )
f a c t o r _ a = RMS_factors ( 1 , 1)
I f c h o i c e = 0 Then
f a c t o r _ v = RMS_factors ( 1 , 2)
End I f
I f c h o i c e = 0 Then
S h e e t s ( " ComfWeight ␣ V e l o c i t y " ) . C e l l s ( 2 , 6 ) = f a c t o r _ v
End I f
F F T _ C o m f w e i g h t _ m a t r i x = FFT_Comfweight . FFT_Comfweight ( f )
a_dof_mode_max = 0
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
I f Abs ( a_dof_mode_max ) > Abs ( a_DOF_mode ( j , i ) ) Then
Else
a_dof_mode_max = Abs ( a_DOF_mode ( j , i ) )
d o f _a _ m a x _ po s = j
mode_a_max = i
End I f
Next j
Next i
I f RMS_comf = 0 Then
’ Relative acceleration
Dim a_DOF_mode_rel ( )
ReDim P r e s e r v e a_DOF_mode_rel ( n _ d o f _ r e d , n _ d o f _ r e d )
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
a_DOF_mode_rel ( j , i ) = GAMMA_vector ( i , 1 ) _
∗ Phi_scaled ( j , i ) ∗ a_ RS_i nte rpol _re l ( i , 1)
Next j
Next i
I f c h o i c e = 0 Then
’ Total velocity
Dim v_DOF_mode ( )
ReDim P r e s e r v e v_DOF_mode ( n _ d o f _ r e d , n _ d o f _ r e d )
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
v_DOF_mode ( j , i ) = GAMMA_vector ( i , 1 ) ∗ _
Phi_scaled ( j , i ) ∗ v_RS_interpol ( i , 1)
Next j
Next i
v_dof_mode_max = 0
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
I f Abs ( v_dof_mode_max ) > Abs ( v_DOF_mode ( j , i ) ) Then
Else
v_dof_mode_max = Abs ( v_DOF_mode ( j , i ) )
dof_v_max_pos = j
mode_v_max = i
End I f
Next j
Next i
End I f
I f RMS_comf = 0 Then
’ Relative velocity
Dim v_DOF_mode_rel ( )
ReDim P r e s e r v e v_DOF_mode_rel ( n _ d o f _ r e d , n _ d o f _ r e d )
For i = 1 To n _ d o f _ r e d
v_dof_mode_max_rel = 0
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
I f Abs ( v _ d o f _ m o d e _ m a x _ r e l ) > Abs ( v_DOF_mode_rel ( j , i ) ) Then
Else
v _ d o f _ m o d e _ m a x _ r e l = Abs ( v_DOF_mode_rel ( j , i ) )
dof_v_max_pos_rel = j
mode_v_max_rel = i
End I f
Next j
Next i
’ Relative displacement
Dim d_DOF_mode_rel ( )
ReDim P r e s e r v e d_DOF_mode_rel ( n _ d o f _ r e d , n _ d o f _ r e d )
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
d_DOF_mode_rel ( j , i ) = GAMMA_vector ( i , 1 ) ∗ _
Phi_scaled ( j , i ) ∗ d_RS_interpol_rel ( i , 1)
Next j
Next i
d_dof_mode_max_rel = 0
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
I f Abs ( d _ d o f _ m o d e _ m a x _ r e l ) > Abs ( d_DOF_mode_rel ( j , i ) ) Then
Else
d _ d o f _ m o d e _ m a x _ r e l = Abs ( d_DOF_mode_rel ( j , i ) )
dof_d_max_pos_rel = j
mode_d_max_rel = i
End I f
Next j
Next i
Else
End I f
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’ SRSS A c c e l e r a t i o n
’ Total
Dim a_SRSS ( )
ReDim P r e s e r v e a_SRSS ( n _ d o f _ r e d , 1 )
Dim a _ s q u a r e d _ s u m ( )
ReDim P r e s e r v e a _ s q u a r e d _ s u m ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
a _ v a l u e _ s q u a r e d = ( a_DOF_mode ( i , j ) ^ 2 )
a_squared_sum ( i , 1) = a_squared_sum ( i , 1) + a_value_squared
Next j
a_SRSS ( i , 1 ) = Sqr ( a _ s q u a r e d _ s u m ( i , 1 ) )
Next i
I f RMS_comf = 0 Then
’ Relative
Dim a _ S R S S _ r e l ( )
ReDim P r e s e r v e a _ S R S S _ r e l ( n _ d o f _ r e d , 1 )
Dim a _ s q u a r e d _ s u m _ r e l ( )
ReDim P r e s e r v e a _ s q u a r e d _ s u m _ r e l ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
a _ v a l u e _ s q u a r e d _ r e l = ( a_DOF_mode_rel ( i , j ) ^ 2 )
a_squared_sum_rel ( i , 1) = a_squared_sum_rel ( i , 1) _
+ a_value_squared_rel
Next j
a _ S R S S _ r e l ( i , 1 ) = Sqr ( a _ s q u a r e d _ s u m _ r e l ( i , 1 ) )
Next i
Else
End I f
’ SRSS V e l o c i t y
I f c h o i c e = 0 Then
’ Total
Dim v_SRSS ( )
ReDim P r e s e r v e v_SRSS ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
v _ v a l u e _ s q u a r e d = ( v_DOF_mode ( i , j ) ^ 2 )
v_squared_sum ( i , 1) = v_squared_sum ( i , 1) + v_value_squared
Next j
v_SRSS ( i , 1 ) = Sqr ( v _ s q u a r e d _ s u m ( i , 1 ) )
Next i
End I f
I f RMS_comf = 0 Then
’ Relative
Dim v _ S R S S_ r e l ( )
ReDim P r e s e r v e v _ S R S S _ r e l ( n _ d o f _ r e d , 1 )
Dim v _ s q u a r e d _ s u m _ r e l ( )
ReDim P r e s e r v e v _ s q u a r e d _ s u m _ r e l ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
v _ v a l u e _ s q u a r e d _ r e l = ( v_DOF_mode_rel ( i , j ) ^ 2 )
v_squared_sum_rel ( i , 1) = v_squared_sum_rel ( i , 1) _
+ v_value_squared_rel
Next j
v _ S R S S_ r e l ( i , 1 ) = Sqr ( v _ s q u a r e d _ s u m _ r e l ( i , 1 ) )
Next i
’ SRSS D i s p l a c e m e n t
’ Relative
Dim d _ S R S S_ r e l ( )
ReDim P r e s e r v e d _ S R S S _ r e l ( n _ d o f _ r e d , 1 )
Dim d _ s q u a r e d _ s u m _ r e l ( )
ReDim P r e s e r v e d _ s q u a r e d _ s u m _ r e l ( n _ d o f _ r e d , 1 )
For i = 1 To n _ d o f _ r e d
For j = 1 To n _ d o f _ r e d
d _ v a l u e _ s q u a r e d _ r e l = ( d_DOF_mode_rel ( i , j ) ^ 2 )
d_squared_sum_rel ( i , 1) = d_squared_sum_rel ( i , 1) _
+ d_value_squared_rel
Next j
d _ S R S S_ r e l ( i , 1 ) = Sqr ( d _ s q u a r e d _ s u m _ r e l ( i , 1 ) )
Else
End I f
’ O u t p u t SRSS v a l u e s
For i = 1 To n _ d o f _ r e d
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 2 5 + i , 3 ) = a_SRSS ( i , 1 )
I f RMS_comf = 0 Then
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 2 5 + i , 5 ) = a _ S R S S _ r e l ( i , 1 )
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 2 5 + i , 6 ) = v _ S RS S _ r e l ( i , 1 )
Else
End I f
I f c h o i c e = 0 Then
S h e e t s ( " Beam␣ C a n t i l e v e r " ) . C e l l s ( 2 5 + i , 4 ) = v_SRSS ( i , 1 )
End I f
Next i
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
A p p l i c a t i o n . ScreenUpdating = True
Application . Calculation = xlCalculationAutomatic
End Sub
Option Base 1
’−−−−−−−−−−−−−−−−R e s p o n s e s p e c t r u m −−−−−−−−−−−−−−−−−−’
F u n c t i o n R e s p o n s e _ s p e c t r u m ( num )
’ num=1 g i v e s m a t r i x w i t h f r e q , a_max ,
’ a _ r e l , v _ r e l and d _ r e l ( and i f c h o i c e =0 , a l s o v_max )
’ num=2 g i v e s n_steps
’ Read i f t h e l o a d i s an a c c e l e r a t i o n o r a v e l o c i t y
choice = Sheets ( " Input " ) . C e l l s (5 , 12)
’ Defining pi
p i = 4 ∗ Atn ( 1 )
’ Defining gravity
g r a v i t y = 9.82 ’ [m/ s ^ 2 ]
’ Read i n p u t v a l u e s
M_unit = 1 ’ mass [ kg ]
zeta = Sheets ( " Input " ) . Cells (3 , 5) ’ damping r a t i o [ −]
alpha = Sheets ( " Input " ) . Cells (6 , 5) ’ a l p h a [ −]
beta = Sheets ( " Input " ) . Cells (7 , 5) ’ b e t a [ −]
d_0 = 0 ’ I n i t i a l d i s p l a c e m e n t [m]
v_0 = 0 ’ I n i t i a l v e l o c i t y [m/ s ]
’ Read i n p u t v e c t o r s f o r l o a d and t i m e
With S h e e t s ( " I n p u t " )
LastRow = . Range ( "A" & . Rows . Count ) . End ( xlUp ) . row
End With
Dim t i m e As V a r i a n t
Dim l o a d As V a r i a n t
t i m e = S h e e t s ( " I n p u t " ) . Range ( "A2 :A" & LastRow ) . V a l u e
’ For c o n s t a n t t i m e s t e p
d e l t a _ t = Sheets ( " Input " ) . Cells (3 , 1) − _
Sheets ( " Input " ) . Cells (2 , 1)
l o a d = S h e e t s ( " I n p u t " ) . Range ( " B2 : B" & LastRow ) . V a l u e
’ D e f i n e l o a d v e c t o r d e p e n d a n t on i n p u t a s
’ ground a c c e l e r a t i o n or ground v e l o c i t y
Dim a _ g r o u n d ( )
ReDim P r e s e r v e a _ g r o u n d ( UBound ( t i m e ) , 1 )
I f c h o i c e = 1 Then ’ c h o i c e =1 g i v e s a c c e l e r a t i o n a s i n p u t
a_ground = load
f o r c e = M_PROD_S( a _ g r o u n d , −M_unit ) ’−m a_ground
Else ’ c h o i c e =0 g i v e s f o r c e a s i n p u t
v_ground = load
For i = 1 To UBound ( t i m e ) − 1
a_ground ( i , 1) = ( v_ground ( i + 1 , 1) − v_ground ( i , 1 ) ) / d e l t a _ t
S h e e t s ( " I n p u t " ) . C e l l s (1 + i , 1 5 ) . Value = a_ground ( i , 1)
Next i
f o r c e = M_PROD_S( a _ g r o u n d , −M_unit ) ’−m a_ground
End I f
’ Creating zero −v e c t o r s
Dim f r e q ( ) ’ f r e q u e n c y [ Hz ]
ReDim P r e s e r v e f r e q ( n _ s t e p s + 1 , 1 )
Dim p e r i o d ( ) ’ period [ s ]
ReDim P r e s e r v e p e r i o d ( n _ s t e p s + 1 , 1 )
Dim omega ( ) ’ period [ s ]
ReDim P r e s e r v e omega ( n _ s t e p s + 1 , 1 )
’ maximum a b s o l u t a c c e l e r a t i o n [m/ s ^ 2 ]
Dim a_max ( )
ReDim P r e s e r v e a_max ( n _ s t e p s + 1 , 1 )
’ maximum a b s o l u t v e l o c i t y [m/ s ]
Dim v_max ( )
ReDim P r e s e r v e v_max ( n _ s t e p s + 1 , 1 )
I f c h o i c e = 0 Then
v_abs_0 = v_ground ( 1 , 1)
End I f
I f c h o i c e = 0 Then
MaxV = 0
MinV = 0
For j = 1 To UBound ( v_abs , 1 )
I f v _ a b s ( j , 1 ) > MaxV Then
MaxV = v _ a b s ( j , 1 )
End I f
I f v _ a b s ( j , 1 ) < MinV Then
MinV = v _ a b s ( j , 1 )
End I f
Next j
v_max ( i , 1 ) = A p p l i c a t i o n . Max ( MaxV , Abs ( MinV ) )
End I f
’ F i n d t h e maximum , a b s o l u t e v a l u e s o f
’ t h e r e l a t i v e a c c e l e r a t i o n s , v e l o c i t i e s , and d i s p l a c e m e n t s
MaxV = 0
MinV = 0
Dim v _ r e l ( )
ReDim P r e s e r v e v _ r e l ( n _ s t e p s + 1 , 1 )
For j = 1 To UBound ( v , 1 )
I f v ( j , 1 ) > MaxV Then
MaxV = v ( j , 1 )
End I f
I f v ( j , 1 ) < MinV Then
MinV = v ( j , 1 )
End I f
Next j
v _ r e l ( i , 1 ) = A p p l i c a t i o n . Max ( MaxV , Abs ( MinV ) )
’ Displacement
MaxD = 0
MinD = 0
Dim d _ r e l ( )
ReDim P r e s e r v e d _ r e l ( n _ s t e p s + 1 , 1 )
For j = 1 To UBound ( d , 1 )
I f d ( j , 1 ) > MaxD Then
MaxD = d ( j , 1 )
End I f
I f d ( j , 1 ) < MinD Then
MinD = d ( j , 1 )
End I f
Next j
d _ r e l ( i , 1 ) = A p p l i c a t i o n . Max ( MaxD , Abs ( MinD ) )
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
Next i ’ next frequency
Next i
Dim o u t p u t _ R S ( )
ReDim P r e s e r v e o u t p u t _ R S ( UBound ( f r e q ) , 7 )
output_RS (1 , 7) = n _ s t e p s
For i = 1 To UBound ( f r e q )
output_RS ( i , 1) = f r e q ( i , 1)
o u t p u t _ R S ( i , 2 ) = a_max ( i , 1 )
output_RS ( i , 4) = a _ r e l ( i , 1)
output_RS ( i , 5) = v _ r e l ( i , 1)
output_RS ( i , 6) = d _ r e l ( i , 1)
I f c h o i c e = 0 Then
o u t p u t _ R S ( i , 3 ) = v_max ( i , 1 )
End I f
Next i
I f num = 1 Then
Response_spectrum = output_RS
End I f
End F u n c t i o n
Option Base 1
F u n c t i o n RMS( RMS_comf )
’ Defining pi
p i = 4 ∗ Atn ( 1 )
’ Defining gravity
g r a v i t y = 9.82 ’ [m/ s ^ 2 ]
’ Read i n p u t v a l u e s
M_unit = 1 ’ mass [ kg ]
zeta = Sheets ( " Input " ) . Cells (3 , 5) ’ damping r a t i o [ −]
alpha = Sheets ( " Input " ) . Cells (6 , 5) ’ a l p h a [ −]
beta = Sheets ( " Input " ) . Cells (7 , 5) ’ b e t a [ −]
d_0 = 0 ’ I n i t i a l d i s p l a c e m e n t [m]
v_0 = 0 ’ I n i t i a l v e l o c i t y [m/ s ]
’ Read i n p u t v e c t o r s f o r l o a d and t i m e
With S h e e t s ( " I n p u t " )
LastRow = . Range ( "A" & . Rows . Count ) . End ( xlUp ) . row
End With
Dim t i m e As V a r i a n t
Dim l o a d As V a r i a n t
t i m e = S h e e t s ( " I n p u t " ) . Range ( "A2 :A" & LastRow ) . V a l u e
d e l t a _ t = Sheets ( " Input " ) . Cells (3 , 1) − _
Sheets ( " Input " ) . Cells (2 , 1)
l o a d = S h e e t s ( " I n p u t " ) . Range ( " B2 : B" & LastRow ) . V a l u e
’ Check a s s u m p t i o n : c o n s t a n t t i m e s t e p
For i = 1 To ( UBound ( time , 1 ) − 1 )
D e l t a = time ( i + 1 , 1) − time ( i , 1) − d e l t a _ t
MsgBox _
"ERROR : ␣ Time ␣ s t e p ␣ n o t ␣ c o n s t a n t ! ␣ Check ␣ I n p u t , ␣A" & W, _
vbCritical
End
End I f
Next i
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’ D e f i n e l o a d v e c t o r d e p e n d a n t on i n p u t a s
’ ground a c c e l e r a t i o n or ground v e l o c i t y
Dim a _ g r o u n d ( )
ReDim P r e s e r v e a _ g r o u n d ( UBound ( t i m e ) , 1 )
I f c h o i c e = 1 Then ’ c h o i c e =1 g i v e s a c c e l e r a t i o n a s i n p u t
a_ground = load
f o r c e = M_PROD_S( a _ g r o u n d , −M_unit ) ’−m a_ground
Else ’ c h o i c e =0 g i v e s v e l o c i t y a s i n p u t
v_ground = load
For i = 1 To UBound ( t i m e ) − 1
a_ground ( i , 1) = ( v_ground ( i + 1 , 1) − v_ground ( i , 1 ) ) / _
delta_t
S h e e t s ( " I n p u t " ) . C e l l s (1 + i , 1 5 ) . Value = a_ground ( i , 1)
Next i
f o r c e = M_PROD_S( a _ g r o u n d , −M_unit ) ’−m a_ground
End I f
’ Creating zero −v e c t o r s
Dim f r e q ( ) ’ f r e q u e n c y [ Hz ]
ReDim P r e s e r v e f r e q ( n _ s t e p s + 1 , 1 )
Dim p e r i o d ( ) ’ period [ s ]
ReDim P r e s e r v e p e r i o d ( n _ s t e p s + 1 , 1 )
Dim omega ( ) ’ period [ s ]
ReDim P r e s e r v e omega ( n _ s t e p s + 1 , 1 )
Dim a_max ( )
ReDim P r e s e r v e a_max ( n _ s t e p s + 1 , 1 )
Dim a_max_RMS ( )
ReDim P r e s e r v e a_max_RMS ( n _ s t e p s + 1 , 1 )
Dim v_max ( )
ReDim P r e s e r v e v_max ( n _ s t e p s + 1 , 1 )
Dim v_max_RMS ( )
ReDim P r e s e r v e v_max_RMS ( n _ s t e p s + 1 , 1 )
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
I f c h o i c e = 0 Then
v_abs_0 = v_ground ( 1 , 1)
End I f
’ Total acceleration
Dim a _ a b s _ r m s ( )
ReDim P r e s e r v e a _ a b s _ r m s ( n _ s t e p s _ p e r _ w i n d o w ∗ _
n_window , 1 )
For k = 1 To UBound ( a _ a b s )
a_abs_rms ( k , 1) = a_abs ( k , 1)
Next k
For k = 1 To UBound ( a _ a b s _ r m s )
I f a _ a b s _ r m s ( k , 1 ) = " " Then
a_abs_rms ( k , 1) = 0
Else
End I f
Next k
Dim a_rms ( )
ReDim P r e s e r v e a_rms ( n_window , 1 )
For k = 1 To n_window
a_rms_n = 0
For kk = 1 To n _ s t e p s _ p e r _ w i n d o w
a_rms_temp = a _ a b s _ r m s ( n _ s t e p s _ p e r _ w i n d o w ∗ _
’ I f i n p u t as v e l o c i t y
’ Total velocity
I f c h o i c e = 0 Then
Dim v _ a b s _ r m s ( )
ReDim P r e s e r v e v _ a b s _ r m s ( n _ s t e p s _ p e r _ w i n d o w ∗ _
n_window , 1 )
For k = 1 To UBound ( v _ a b s )
v_abs_rms ( k , 1) = v_abs ( k , 1)
Next k
For k = 1 To UBound ( v _ a b s _ r m s )
I f v _ a b s _ r m s ( k , 1 ) = " " Then
v_abs_rms ( k , 1) = 0
Else
End I f
Next k
Dim v_rms ( )
ReDim P r e s e r v e v_rms ( n_window , 1 )
For k = 1 To n_window
v_rms_n = 0
For kk = 1 To n _ s t e p s _ p e r _ w i n d o w
v_rms_temp = v _ a b s _ r m s ( n _ s t e p s _ p e r _ w i n d o w ∗ _
( k − 1 ) + kk , 1 )
v_rms_n = v_rms_n + ( v_rms_temp ^ 2 )
Next kk
v_rms ( k , 1 ) = Sqr ( 1 / n _ s t e p s _ p e r _ w i n d o w ∗ v_rms_n )
Next k
End I f
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’−−−−−−−−−−−−−F i n d maximum v a l u e s −−−−−−−−−−−−−−−−−−−’
’ F i n d t h e maximum , a b s o l u t e v a l u e s o f RMS a c c e l e r a t i o n s
MaxA = 0
MinA = 0
For j = 1 To UBound ( a_rms , 1 )
I f a_rms ( j , 1 ) > MaxA Then
MaxA = a_rms ( j , 1 )
End I f
MaxA = 0
MinA = 0
For j = 1 To UBound ( a _ a b s , 1 )
I f a _ a b s ( j , 1 ) > MaxA Then
MaxA = a _ a b s ( j , 1 )
End I f
I f a _ a b s ( j , 1 ) < MinA Then
MinA = a _ a b s ( j , 1 )
End I f
Next j
a_max ( i , 1 ) = A p p l i c a t i o n . Max ( MaxA , Abs ( MinA ) )
I f c h o i c e = 0 Then
MaxV = 0
MinV = 0
For j = 1 To UBound ( v_rms , 1 )
I f v_rms ( j , 1 ) > MaxV Then
MaxV = v_rms ( j , 1 )
End I f
I f v_rms ( j , 1 ) < MinV Then
MinV = v_rms ( j , 1 )
End I f
Next j
v_max_RMS ( i , 1 ) = A p p l i c a t i o n . Max ( MaxV , Abs ( MinV ) )
MaxV = 0
MinV = 0
For j = 1 To UBound ( v_abs , 1 )
I f v _ a b s ( j , 1 ) > MaxV Then
MaxV = v _ a b s ( j , 1 )
End I f
I f v _ a b s ( j , 1 ) < MinV Then
MinV = v _ a b s ( j , 1 )
End I f
Next j
v_max ( i , 1 ) = A p p l i c a t i o n . Max ( MaxV , Abs ( MinV ) )
End I f
’ M u l t i p l y v e c t o r s w i t h 1000 t o g e t i n mm
a_max = M_PROD_S( a_max , 1 0 0 0 )
a_max_RMS = M_PROD_S( a_max_RMS , 1 0 0 0 )
I f c h o i c e = 0 Then
v_max = M_PROD_S( v_max , 1 0 0 0 )
v_max_RMS = M_PROD_S( v_max_RMS , 1 0 0 0 )
End I f
’ D e c i d e a t w h i c h row t h e a v e r a g e RMS v a l u e
’ s t a r t s c a l c u l a t i n g from
s t a r t _ f a c t o r = 250
Dim f a c t o r _ v e c t o r _ a ( )
ReDim P r e s e r v e f a c t o r _ v e c t o r _ a ( UBound ( f r e q ) − _
( s t a r t _ f a c t o r − 1) , 1)
Dim f a c t o r _ v e c t o r _ v ( )
ReDim P r e s e r v e f a c t o r _ v e c t o r _ v ( UBound ( f r e q ) − _
( s t a r t _ f a c t o r − 1) , 1)
factor_save_a = 0
For i = s t a r t _ f a c t o r To UBound ( f r e q )
f a c t o r _ v e c t o r _ a ( i − ( s t a r t _ f a c t o r − 1) , 1) = _
a_max_RMS ( i , 1 ) / a_max ( i , 1 )
values_a_sum = f a c t o r _ v e c t o r _ a ( i − _
( s t a r t _ f a c t o r − 1) , 1) + f a c t o r _ s a v e _ a
f a c t o r _ s a v e _ a = values_a_sum
Next i
I f c h o i c e = 0 Then
factor_save_v = 0
For i = s t a r t _ f a c t o r To UBound ( f r e q )
f a c t o r _ v e c t o r _ v ( i − ( s t a r t _ f a c t o r − 1) , 1) = _
v_max_RMS ( i , 1 ) / v_max ( i , 1 )
values_v_sum = f a c t o r _ v e c t o r _ v ( i − _
( s t a r t _ f a c t o r − 1) , 1) + factor_save_v
f a c t o r _ s a v e _ v = values_v_sum
Next i
End I f
f a c t o r _ a = v a l u e s _ a _ s u m / UBound ( f a c t o r _ v e c t o r _ a )
I f c h o i c e = 0 Then
f a c t o r _ v = v a l u e s _ v _ s u m / UBound ( f a c t o r _ v e c t o r _ v )
End I f
RMS_factors ( 1 , 1) = f a c t o r _ a
RMS_factors ( 1 , 2) = f a c t o r _ v
RMS = R M S _ f a c t o r s
End F u n c t i o n
Option Base 1
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’ The f u n c t i o n c a l c u l a t e s t h e r e s p o n s e f o r e v e r y f r e q u e n c y
’ w i t h Newmark−b e t a method , FFT and C o m f o r t W e i g h t i n g
F u n c t i o n FFT_Comfweight ( f )
S h e e t s ( " R e s p o n s e ␣ s p e c t r u m " ) . Range ( "A2 : O5000 " ) . C l e a r C o n t e n t s
’ Read i f t h e l o a d i s an a c c e l e r a t i o n o r a v e l o c i t y
choice = Sheets ( " Input " ) . C e l l s (5 , 12)
’ Defining pi
p i = 4 ∗ Atn ( 1 )
’ Defining gravity
g r a v i t y = 9.82 ’ [m/ s ^ 2 ]
’ D e f i n i n g number o f s t e p s f o r f r e q u e n c i e s
n _ s t e p s = UBound ( f ) − 1
’ Read i n p u t v a l u e s
M_unit = 1 ’ mass [ kg ]
zeta = Sheets ( " Input " ) . Cells (3 , 5) ’ damping r a t i o [ −]
a l p h a = S h e e t s ( " I n p u t " ) . C e l l s ( 6 , 5 ) ’ a l p h a [ −]
b e t a = S h e e t s ( " I n p u t " ) . C e l l s ( 7 , 5 ) ’ b e t a [ −]
d_0 = 0 ’ I n i t i a l d i s p l a c e m e n t [m]
v_0 = 0 ’ I n i t i a l v e l o c i t y [m/ s ]
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’ Read i n p u t v e c t o r s f o r l o a d and t i m e
With S h e e t s ( " I n p u t " )
LastRow = . Range ( "A" & . Rows . Count ) . End ( xlUp ) . row
End With
Dim t i m e As V a r i a n t
Dim l o a d As V a r i a n t
t i m e = S h e e t s ( " I n p u t " ) . Range ( "A2 :A" & LastRow ) . V a l u e
’ Check a s s u m p t i o n : c o n s t a n t t i m e s t e p
For i = 1 To ( UBound ( time , 1 ) − 1 )
D e l t a = time ( i + 1 , 1) − time ( i , 1) − d e l t a _ t
I f D e l t a < 1 ∗ 10 ^ −4 Then
delta_t = delta_t
Else
W= i + 2
’ A p p l i c a t i o n . S p e e c h . S p e a k " Time s t e p n o t c o n s t a n t ! "
MsgBox _
"ERROR : ␣ Time ␣ s t e p ␣ n o t ␣ c o n s t a n t ! ␣ Check ␣ I n p u t , ␣A" & W, _
vbCritical
End
End I f
Next i
’ D e f i n e l o a d v e c t o r d e p e n d a n t on i n p u t a s
’ ground a c c e l e r a t i o n or ground v e l o c i t y
Dim a _ g r o u n d ( )
ReDim P r e s e r v e a _ g r o u n d ( UBound ( t i m e ) , 1 )
I f c h o i c e = 1 Then ’ c h o i c e =1 g i v e s a c c e l e r a t i o n a s i n p u t
a_ground = load
f o r c e = M_PROD_S( a _ g r o u n d , −M_unit ) ’−m a_ground
Else ’ c h o i c e =0 g i v e s f o r c e a s input
v_ground = load
For i = 1 To UBound ( t i m e ) − 1
a_ground ( i , 1) = ( v_ground ( i + 1 , 1) − v_ground ( i , 1)) / delta_t
S h e e t s ( " I n p u t " ) . C e l l s (1 + i , 1 5 ) . Value = a_ground ( i , 1)
Next i
f o r c e = M_PROD_S( a _ g r o u n d , −M_unit ) ’−m a_ground
End I f
’ Creating zero −v e c t o r s
Dim f r e q ( ) ’ f r e q u e n c y [ Hz ]
ReDim P r e s e r v e f r e q ( n _ s t e p s + 1 , 1 )
Dim p e r i o d ( ) ’ period [ s ]
ReDim P r e s e r v e p e r i o d ( n _ s t e p s + 1 , 1 )
Dim omega ( ) ’ period [ s ]
ReDim P r e s e r v e omega ( n _ s t e p s + 1 , 1 )
Dim a_max ( )
ReDim P r e s e r v e a_max ( n _ s t e p s + 1 , 1 )
Dim v_max ( )
ReDim P r e s e r v e v_max ( n _ s t e p s + 1 , 1 )
Dim v_max_FFT ( )
ReDim P r e s e r v e v_max_FFT ( UBound ( f ) , 1 )
For i = 1 To n _ s t e p s + 1
S h e e t s ( " 1 F F T I n p u t " ) . Range ( "A2 : O10000 " ) . C l e a r C o n t e n t s
freq ( i , 1) = f ( i , 1)
period ( i , 1) = 1 / freq ( i , 1)
omega ( i , 1 ) = 2 ∗ p i ∗ f r e q ( i , 1 )
omega_SDOF = 2 ∗ p i ∗ f r e q ( i , 1 )
f_SDOF = f r e q ( i , 1 )
k_SDOF = M_unit ∗ omega_SDOF ^ 2
c = 2 ∗ z e t a ∗ M_unit ∗ omega_SDOF
m _ e f f e c t i v e = M_unit + c ∗ d e l t a _ t ∗ _
a l p h a + k_SDOF ∗ d e l t a _ t ^ 2 ∗ b e t a
a_0 = f o r c e ( 1 , 1 ) / M_unit − 2 ∗ z e t a ∗ _
omega_SDOF ∗ v_0 − omega_SDOF ^ 2 ∗ d_0
a _ a b s _ 0 = a_0 − f o r c e ( 1 , 1 ) / M_unit
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’ C r e a t i n g v e c t o r f o r maximum a c c e l e r a t i o n s , v e l o c i t i e s
’ and d i s p l a c e m e n t s
For j = 1 To ( UBound ( time , 1 ) − 1 )
A( j + 1 , 1 ) = (− M_unit ∗ a _ g r o u n d ( j + 1 , 1 ) − c ∗ _
( d e l t a _ t / 2 ∗ A( j , 1 ) + v ( j , 1 ) ) − k_SDOF ∗ ( 0 . 5 ∗ d e l t a _ t ^ 2 ∗ _
( 1 − 2 ∗ b e t a ) ∗ A( j , 1 ) + d e l t a _ t ∗ v ( j , 1 ) + d ( j , 1 ) ) ) / m _ e f f e c t i v e
v ( j + 1 , 1 ) = A( j , 1 ) ∗ d e l t a _ t ∗ ( 1 − a l p h a ) + A( j + 1 , 1 ) ∗ _
d e l t a _ t ∗ alpha + v ( j , 1)
d ( j + 1 , 1 ) = A( j , 1 ) ∗ ( d e l t a _ t ^ 2 ) / 2 ∗ ( 1 − 2 ∗ b e t a ) + _
A( j + 1 , 1 ) ∗ d e l t a _ t ^ 2 ∗ b e t a + v ( j , 1 ) ∗ d e l t a _ t + d ( j , 1 )
’ Total values
I f c h o i c e = 1 Then
a _ a b s ( j + 1 , 1 ) = A( j + 1 , 1 ) + a _ g r o u n d ( j + 1 , 1 )
Else
a _ a b s ( j + 1 , 1 ) = A( j + 1 , 1 ) + a _ g r o u n d ( j + 1 , 1 )
v_abs ( j + 1 , 1) = v ( j + 1 , 1) + v_ground ( j + 1 , 1)
End I f
Next j
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’−−−−−−−−−−−−−−−−−−FFT−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’ Find d i m e n s i o n s o f i n p u t v e c t o r s
exp_FFT = Round ( Log ( UBound ( t i m e ) ) / Log ( 2 ) + 0 . 5 )
l e n g t h _ F F T = 2 ^ exp_FFT
Dim time_FFT ( )
ReDim P r e s e r v e time_FFT ( l e n g t h _ F F T , 1 )
Dim f r e q _ F F T ( )
ReDim P r e s e r v e f r e q _ F F T ( l e n g t h _ F F T , 1 )
freq_FFT ( 1 , 1) = 0
Dim P1_FFT_acc ( )
ReDim P r e s e r v e P1_FFT_acc ( l e n g t h _ F F T , UBound ( f ) )
Dim P1_FFT_vel ( )
ReDim P r e s e r v e P1_FFT_vel ( l e n g t h _ F F T , UBound ( f ) )
Dim a _ t o t _ F F T ( )
ReDim P r e s e r v e a _ t o t _ F F T ( l e n g t h _ F F T , 1 )
’ D e f i n i n g f r e q u e n c y r a n g e f o r FFT a n a l y s i s o u t p u t
f_sample = 1 / d e l t a _ t ’ Sample f r e q u e n c y [ Hz ]
f _ f o l d i n g = f _ s a m p l e / l e n g t h _ F F T ’ F o l d i n g f r e q u e n c y [ Hz ]
For k = 1 To UBound ( t i m e )
time_FFT ( k , 1 ) = t i m e ( k , 1 )
a_tot_FFT ( k , 1) = a_abs ( k , 1)
Next k
For k = 1 To l e n g t h _ F F T
I f time_FFT ( k , 1 ) = " " Then
time_FFT ( k , 1 ) = 0
a_tot_FFT ( k , 1) = 0
Else
End I f
Next k
For j = 1 To l e n g t h _ F F T
S h e e t s ( " 1 FFTInput " ) . C e l l s ( j + 1 , 1 ) . Value = a_tot_FFT ( j , 1)
Next j
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
Run FFT , S h e e t s ( " 1 F F T I n p u t " ) . Range ( "A2 : A4097 " ) , _
S h e e t s ( " 1 FFTInput " ) . C e l l s ( 2 , 2 ) , False , F a l s e
For j = 1 To l e n g t h _ F F T
P1_FFT_acc ( j , i ) = ( 2 / l e n g t h _ F F T ) ∗ _
W o r k s h e e t F u n c t i o n . ImAbs ( S h e e t s ( " 1 F F T I n p u t " ) . C e l l s ( j + _
1 , 2 ) . Value )
’ S h e e t s ( " 1 F FT I n p ut " ) . C e l l s ( j + 1 , 4 ) = P1_FFT_acc ( j , i )
Next j
Dim v _ t o t _ F F T ( )
ReDim P r e s e r v e v _ t o t _ F F T ( l e n g t h _ F F T , 1 )
For k = 1 To UBound ( t i m e )
time_FFT ( k , 1 ) = t i m e ( k , 1 )
a_tot_FFT ( k , 1) = a_abs ( k , 1)
v_tot_FFT ( k , 1) = v_abs ( k , 1)
Next k
For j = 1 To l e n g t h _ F F T
S h e e t s ( " 1 FFTInput " ) . C e l l s ( j + 1 , 1 ) . Value = a_tot_FFT ( j , 1)
S h e e t s ( " 1 FFTInput " ) . C e l l s ( j + 1 , 5 ) . Value = v_tot_FFT ( j , 1)
Next j
End I f
’−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’
’−−−−−−−−−−−−−−C o m f o r t w e i g h t i n g i n E x c e l s h e e t ’−−−−−−−−−’
I f c h o i c e = 1 Then ’ Acceleration
For j = 1 To l e n g t h _ F F T / 2
S h e e t s ( " ComfWeight ␣ A c c e l e r a t i o n " ) . C e l l s ( 2 5 + _
j , 3) = freq_FFT ( j , 1)
S h e e t s ( " ComfWeight ␣ A c c e l e r a t i o n " ) . C e l l s ( 2 5 + _
j , 4 ) = P1_FFT_acc ( j , i )
Next j
’ R e f r e s h s h e e t , " F9 "
S h e e t s ( " ComfWeight ␣ A c c e l e r a t i o n " ) . C a l c u l a t e
a_max_FFT ( i , 1 ) = _
S h e e t s ( " ComfWeight ␣ A c c e l e r a t i o n " ) . C e l l s ( 4 , 4 5 ) . V a l u e
Else ’ A c c e l e r a t i o n and v e l o c i t y
For j = 1 To l e n g t h _ F F T / 2
For i = 1 To UBound ( f )
F F T _ C o m f w e i g h t _ m a t r i x ( i , 1 ) = a_max_FFT ( i , 1 )
I f c h o i c e = 0 Then
F F T _ C o m f w e i g h t _ m a t r i x ( i , 2 ) = v_max_FFT ( i , 1 )
End I f
Next i
FFT_Comfweight = F F T _ C o m f w e i g h t _ m a t r i x
End F u n c t i o n