You are on page 1of 8

NDOF: A MATLAB GUI for teaching and simulating structural dynamics

JMW Brownjohn, A. Pavic Vibration Engineering Section, University of Sheffield Mappin Street, Sheffield S1 3JD, UK
ABSTRACT As a visual aid to a professional course on management of vibration serviceability in civil structures, we developed a visualisation tool using MATLAB, and driven by a multi-page graphical user interface (GUI). The software was originally designed to analyse the behaviour of ‘stick models’ which feature frequently in textbooks on structural dynamics and represent the lateral sway dynamics of shear buildings with N floors, i.e. N degrees of freedom (hence the software name). NDOF progresses the user through creation of the idealised finite element representation in terms of mass, stiffness and damping matrices with up to 16 rows and columns and demonstrates (with animation) the modal properties. A range of dynamic forces and initial conditions in nodal or modal frames of reference, plus a range of calculation procedures are used to determine the dynamic response. The response is visualised with animation, presenting time histories of all nodal and modal response and force components, together with scaled force vectors. Further presentations of either the system or the response are available in frequency domain. NDOF can simulate nonlinear response, run vibration serviceability assessments (using a library of footfall data) and accept user-defined structural matrices in lieu of simple stick models. 1 INTRODUCTION For presentations to undergraduate and postgraduate students as well as to professional engineers, the authors frequently need to demonstrate the nature of linear structural dynamics effectively and visually. The first time the authors needed to do this together was at a continuing professional development (CPD) course in Singapore in 2002. Due to past experience in creating visual aids and animations using the interactive graphical tools of MATLAB and having already created a MATLAB-based GUI, MODAL [1] for signal processing and modal analysis (similar to the MACEC software created at KU Leuven by the team of Guido de Roeck), this was ideal opportunity to design a simple interface for demonstrating the concepts of structural dynamics. NDOF has been continually developed since then, and at 10/2007 is at version 37. Much of the development was in the first year, with a range of features progressively added and bugs fixed to improve utility. 2 FUNCTIONALITY By then end of 2002, at version 12, NDOF featured the majority of its present functionality which then included: Model creation screen In which a stick model with up to seven degrees of freedom is created, including the support (which in general could be allowed to move). Mass, stiffness and damping properties could be entered for individual or collective degrees of freedom, with Rayleigh, modal or zero damping as well as dashpots in parallel with stiffness, leading to (in general) non-proportional damping. Editable mass, stiffness and damping matrices, with mathematical feasibility checks allowed for systems other than simple stick models to be simulated. Modal analysis screen In which the results of the modal analysis based on system matrices would be displayed, with mode shape animation, even though all calculations were done with the first screen. Frequency response screen In which the various forms of frequency response function would be displayed as well as impulse response functions. Time response analysis screen In which a range of forcing functions, including base excitation, would be selected. For forced excitation modal or nodal forces would be defined, and a range of modal or nodal initials conditions set. In the original version analysis methods could be selected out of Duhamel integral and a MATLAB state-space first order solver for either decoupled (modal) or full matrix analysis.

with screen numbers A limited idea of the present functionality of NDOF is demonstrated through an example of a lumped mass stick model having five degrees of freedom (DOF). the second of which is the relatively recent addition of the module for floor (or footbridge) response (to walking). damping. for two routes. leads to a system with four active degrees of freedom and four resulting modes. operational functions from ‘Model create’ to Time/frequency display’ are greyed out while in any one of them and progressively enabled moving from left to right through the sequence of model creation to display of results. which since the base DOF is fixed.Time response display screen In which the results of the analysis would be displayed. Plots of time history of various combinations of force components and the different representations of response (modal or nodal in each case) are linked with animations including vectors of the stiffness. Figure 1 NDOF functions The progression through the various stages is illustrated in Figure 2. designed to support a core module in our Structural Engineering MSc programme and for CPD to professionals. .g. 3 DEVELOPMENTS FROM 2003 TO 2007 Developments of NDOF have been driven primarily by requirements of various courses in dynamics leading to improvements in its utility as a teaching aid. Floor response only (3) Figure 2 NDOF flowchart. modes could be switched in and out of the response and force summation to illustrate the workings of modal decomposition. Some improvements have been made in its function as a structural dynamics simulator and finally as a tool for conducting vibration serviceability assessments of floors and footbridges. The improvements include • • • • • • • • • • • • Switch between vertical/sway displacement of vertical stick model Loading and saving of models and results Option for simulating linear summation of multi-mode response to multi-harmonic (walking) excitation Learning and replay mode with running commentary Display of seismic response parameters (e. error and status information and other visual cues A first page with disclaimer and banner Toggle of various features via ‘file’ drop-down menu Figure 1 shows the full set of modules and function in NDOF. For modal-based response calculations. participation factors) Larger range of forcing functions including a database of footfall force time histories and more base excitation options Non-linear response option with user-defined system and Runge-Kutta integration Screen for displaying combination of frequency and time domain representations of response Theory reference for all capabilities Auto-help functions on UI buttons. Time response display (5a) Time domain response calcs (4) Nodal basis Modal analysis (2) Time/frequency response display (5b) Frequency response (3) Model creation (1) Modal basis Frequency response. inertia and external forces to illustrate the response mechanisms.

Figure 3. hence the bounce (vertical)/sway (lateral) motion option. i. C and K are displayed. shapes or damping. In the background MATLAB command window. increasing vertically up) or consistent with matrix indexing (increasing vertically down).n_create('writemck') . it does mean that not only can the values in the editable windows be changed. and all these variables can be changed at the command prompt.m=eye(4). The displayed system matrices offer a number of possibilities. While this is not usually a good idea for robustness. One is the choice of nodal numbering (by storey. Multiplying both values by 106 gives realistic full-sale properties without changing mode frequencies. for display purposes a nominal 1000N/m storey stiffness is used. a verbose display (which can be toggled off) shows the complete modal solution for the damped first-order (state space) model and the undamped second order model. but also that user matrices can be input at the MATLAB prompt. Two options affect only the visualisation.n_create('usermck'). all the internal variables are available in the MATLAB structure MODES. First. with a nominal 1kg storey mass.4 CREATION SCREEN (1) (Figure 3) 1 2 3 4 5 Figure 3 Model creation screen (1) In the first screen. As soon as the number of DOF is selected the system modal solution is obtained and displayed.e. For example the command: MODES. Rayleigh damping is chosen and all the system matrices M. also updated every time one of the parameters is updated. Also it is occasionally useful to visualise vibrations in the vertical direction.

For complex modes (non-proportionally damped systems) phases are not restricted to 0° or 180°. There are fail-safe traps to prevent mathematically and structurally impossible entries.956% 1 0. slaving rotations to the translations.0° 5 0. In this screen there is an option to switch from the default mode shape scaling of mass-normalisation to unity normalisation in which the largest modal ordinate is set to +1. The sample shows mode phases and amplitudes. since all modal parameters are calculated in the first screen.2% m=1 L =0.07823.228 180. 1. Passing this screen to get to the analysis stage forces the user/learner to understand and visualise the necessary step of determining the vibration modes.scoss.0° 4 0.0° 3 0.000 0.will load a unit mass matrix into the system. For the benefit of seismic response analysis. 5 MODAL ANALYSIS SCREEN (2) (Figure 4) mode: 3 f=7. modal property screen (2) This screen does not do any calculations.org.2797 Γ =0. including mode shape displays and animations. modal participation factor L and mass participation Γ are displayed.0° Figure 4 Modal analysis. Hence the function of this screen is to display the modal parameters.2797 Γr =0.429 0. One of the SCOSS recommendations was for better visualisation tools. as provided in NDOF. zeta=24. the animations have complexity. beginning with this screen.7109Hz. Where the modes are complex.0° 2 0. . Another useful possibility is to replace the shear-type model with a cantilever-type model.577 -180. NDOF seeks to address concerns by the UK Standing Committee on Structural Safety www. display it and make the necessary adjustments. A separate script is (in this case) used to create a four-storey 8DOF model including rotations which is then condensed back to 4DOF.657 -0.uk concerning inadequate coverage of structural dynamics in undergraduate curricula.

sec /N) Figure 5 Frequency response function screen (3). df (frequency resolution) and fmax (maximum frequency) parameters. all the data displayed are available in ‘view data’ window and can be saved to a file from an option on the drop-down file menu (like print function). With proportional damping. fmax and dt are each other’s inverse. . mobility and receptance (i.e. T depends on df. showing markers on the plots at the data points. for nodal basis analysis This screen presents the system characteristics in terms of time-domain impulse response functions (IRF) or their frequency domain equivalent. real. the frequency response function (FRF). As well as viewing modes. which do not function for nonproportionally damped systems with complex modes. Changing the values shows the interdependence of the parameters i. phase. of sample points) not editable. modes can be switched in and out by checkboxes.e.sec /N) 3 2 1 0 -2 -2 -2 -1 0 -2 1 2 Imag : DOF 1 vs DOF 1 4 Im(m. as well as ‘dots’.sec /N) Im(m. Forms available are: modulus. and npts is both the length of the vector of time data and the length of the frequency data. with T (force/response duration) and npts (no. imaginary (frequency domain). Linked zooming is available. FRFs and IRFs can be defined as inertance. via acceleration.sec /N) -2 2 0 2 0 10 -2 0 5 F/Hz -2 0 5 F/Hz 10 Re(m. modal and nodal IRFs (time domain) for various input/output pair combinations. Control of the display x-axes is via the dt (time step). where zeroes (peaks) occur at frequencies different from those of the structure. velocity or displacement respectively) as well as in the form of transmissibility function and ratio of FRF between outputs.sec /N) Im(m. Switching between time and frequency domain displays serves to illustrate the connection between record length and frequency resolution and between sample rate and time interval.sec /N) -2 Re(m.6 FREQUENCY RESPONSE SCREEN (3) (Figure 5) Real : DOF 1 vs DOF 1 Nyquist: DOF 1 vs DOF 1 2 1 0 -1 -2 4 3 2 1 0 Re(m.

modal decomposition is not available. The ‘modes’ UI selector sets the highest mode number in the integration. Sine. Gaitway refers to the Kistler treadmill originally used to record continuous walking forces [2]. from almost zero to 10Hz.7 TIME DOMAIN RESPONSE CALCULATION (4) (Figure 6) DOF displacements DOF 1 40 20 0 Time DOF 2 40 20 0 Time DOF 3 40 20 0 Time DOF 4 40 20 0 2 4 6 t /seconds 8 Figure 6 Time domain response screen (4) This is the key section of NDOF: A range of time-domain excitation functions are available (inset. and other parameters default optimally. random. The default loading is ‘zero force’ which requires use of nodal initial conditions (modal initial conditions can be set for proportional damping). modal decomposition using ode5 and modal decomposition using Duhamel integral. With non-proportional damping. Capabilities for non-linear analysis exist since the system matrices and load/response parameters are accessible and editable via MATLAB scripts entered in a user text box. Figure 6). Figure 6 shows one example. to avoid problems with outlying high frequency modes. as can time series from a library of recorded footfall forces. impulse and step describe functions that can be tailored according to the parameters in the right half of the menu. but Runge-Kutta integration is. User supplied forcing functions (with a specific format) can be selected. npts is set to avoid lengthy calculations. The default dt is set for stable integration. calculation options are (full) matrix integration using MATLAB/Simulink ode5 engine on the state space model. and should be used with non-linear analysis. . The last set of four functions defines base excitation for investigation of transmissibility or seismic response. We believe that every worked example featuring free and forced vibration of shear building/stick models published in structural dynamics textbooks can be simulated and visualised using NDOF. the chirp. Figure 6 shows the screen available when using proportional damping. chirp.

which has a more limited companion timefrequency display. Using the arrows it is easy to see the balance forces e. Other options include (slow) saving animation to AVI file. displaying numbers for the data points on all the plots and mode and forcing function information. where inertia and stiffness balance 90° out of phase with damping and external force. hence the importance of this screen.2 Figure 7 Time display screen We believe that visualisation is key to understanding structural dynamics. The centre display is the ‘stick model’ displaying displacements along with scaled arrows indicating inertia. at resonance. those on the right to displacement related ones (inset. Figure 8 forces and responses . Motion of the structure can be animated with speed up/slow down. also by dragging red dots on any plot the structure is moved to that data point.5 0. base shear/reaction arrows can be toggled on or off.5 mode 3 mode 3 mode 4 2 4 6 8 time/seconds -2 100 0 0 -0. Figure 8) with possibility to display superposed base motions for base excitation.2 mode 4 -100 200 100 0 -100 -80N 0 1m 2 4 6 8 time/seconds 0 -0. damping. A very useful facility is switching modes in and out of the response so that modal contributions to total response can be visualised. step back/forward and restart.sec -2 0 -2 1 mode 2 0 0 -1 0. pause.g.8 TIME DISPLAY SCREEN (5a) (Figure 7) 2 mode 1 external forces/N 200 mode 1 100 0 -100 2 mode 2 modal accelerations/m. The plots on the left relate to force-related nodal (or modal) quantities. stiffness and external forces on the nodes. with accumulating storey shear forces instead of external forces for base excitation. In each case.

mass.4) a3 (6.5 1 -150 0. damping and shape coordinates for the footfall excitation and response points. Singapore. NTU School of CSE.' Applied Research Project RG5/97. Hao H and Pan TC. Concrete Society. Canadian Journal of Civil Engineering 31(1).9 HIGH AND LOW FREQUENCY FLOOR RESPONSE SCREEN (3) (Figure 9) 3 2.5 -50 2 Mag(m/N) 1. For high frequency floors. 65-77. modal impulses are implemented. (2001). The upper plots in Figure 9 represent the location of the harmonic in relation to the mode frequencies via the structure FRF.2) 40 2 a2 (4. Low frequency floors with first mode below 10Hz are supposed to develop resonance response due to forcing by the first 4 harmonic components of the walking forcing function which have random phase angles. with tabular input of modal frequency. UK. Technical Report 43. Appendix G in PostTensioned Concrete Floors Design Handbook. Pavic A and Willford M (2005) Vibration Serviceability of Post-Tensioned Concrete Floors. indicates SRSS values in the right hand bar and finally plots the SRSS and accumulating contributions against frequency. Slough.5 0 -200 φ (deg) -100 x 10 -6 Mag 0 Phase 0 2 4 6 F/Hz 8 10 0 2 4 6 F/Hz 8 10 a1 (2. In the CREATE screen (Figure 3). 10 REFERENCES 1 2 3 Brownjohn JMW. Pavic A and Omenzetter P (2004). . The sweep function steps the pacing rate through the specified range. 'Assessment of structural condition of bridges by dynamic measurements. pressing ‘App G’ converts from nodal-inputs to modal-based inputs. 2nd Edition. A spectral density approach for modeling continuous vertical forces on pedestrian structures due to walking. Brownjohn JMW. while each circle represents the summation of modal responses due to a single harmonic.6) a4 (8.8) %SRSSmax 100 80 Re(an) mm/sec 20 60 0 40 -20 20 -40 0 Figure 9 Screen (3) for Appendix G module response calculations This screen shows the procedures implemented in design guidance published by the UK Concrete Society [3].