New Image Recognition Technique for Intuitive Understanding in Class of the Dynamic Response of High-Rise Buildings

: In the last years, more and more studies have highlighted the advantages of complementing traditional master classes with additional activities that improve students’ learning experience. This combination of teaching techniques is specially advised in the ﬁeld of structural engineering, where intuition of the structural response it is of vital importance to understand the studied concepts. This paper deals with the introduction of a new (and more encouraging) educational tool to introduce students intuitively to the dynamic response of structures excited with an educational shaking table. Most of the educational structural health monitoring systems use sensors to determine the dynamic response of the structure. The proposed tool is based on a radically different approach, as it is based on low-cost image-recognition techniques. In fact, it only requires the use of an amateur camera, a black background, and a computer. In this study, the effects of both the camera location and the image quality are also evaluated. Finally, to validate the applicability of the proposed methodology, the dynamic response of small-scale buildings with different typologies is analyzed. In addition, a series of surveys were conducted in order to evaluate the activity based on student’s satisfaction and the actual acquisition and strengthening of knowledge. used to compare the different typologies proposed. The survey conducted illustrated the improvement in students’ conﬁdence and motivation.


Introduction
Mathematical models are used to simulate the response of structures under static or dynamics loads. In structural courses, these models are taught based on a theoretical approach mainly focused on mathematical equations [1]. For example, students are traditionally introduced to the static structural response of structures by the stiffness matrix method [2]. This procedure uses the members' stiffness relations for computing internal forces and nodal displacements by equilibrium and stiffness equations. On the other hand, for a dynamic simulation, students are usually introduced to a modal analysis procedure [3]. In this matrix method, the equations are considered a dynamic spring mass system, where eigenvalue analysis provides information of both the frequencies and mode shapes of the structure. These static and dynamic approaches are always based on simplifications. For example, the stiffness matrix method assumes the elements to have idealized mechanical and material properties interconnected at the nodes, uniform mechanical and geometrical properties and ideal boundary conditions, among other simplifications. Unfortunately, because of these simplifications, actual structures on site rarely correspond to the numerical models. In this case, to get a representative behavior of the structure, the calibration of the model parameters on site might be advised [4,5]. This calibration can use structural system identification (SSI) techniques to measure the actual response of the structure on site by Despite the many works published about this topic, many researchers agree that this procedure is still under development, and it is expected that huge technological progress will be made in the coming years. In fact, according to the authors of [14,15] most applications of the image-recognition techniques in the literature are focused on measurements of small-scale laboratory structures. The application on large structures on site is traditionally based on the analysis of a limited number of points for a short time period. In the near future, it is expected that the development of image-recognition techniques will enable a more efficient application of these methods on real structures [16].
In spite of the importance of structural health monitoring techniques, most universities only address this topic on advanced courses based (almost exclusively) on theoretical classes. There is no doubt that this mathematical approach is a compulsory requirement to achieve a deep understanding of the actual response of the structural systems on site. Nevertheless, many experiences have proved the benefits of adding complementary methodologies to strengthen the students' intuitive perception of this kind of problem. In fact, the traditional teaching procedure has been complemented with new and innovative approaches, such as project-based learning [17][18][19][20][21][22].
The analysis of the literature shows the interest to develop more innovative and efficient teaching methodologies that ease students into understanding structural concepts (such as the dynamic behavior of structures) that are hardly perceived from just the mathematical formulations [23]. For example, many authors (such as those of [24][25][26][27]) have proposed practical activities to monitor the dynamic response of small-scale models on educational shaking tables using low-cost sensors. In fact, experiences learned in this work have proven the learning benefits of including a small-scale model analysis when teaching the dynamic response of structures.
This paper aims to improve students' learning experience of complex concepts (such as the dynamic response of structures) by combining the traditional theoretical classes with more intuitive activities that enable the development of students' intuitiveness. To do so, in this paper, a new educational tool is proposed to monitor the dynamic response of small-scale structures using image-recognition techniques. The analyzed models are built with an economic and easy-to-build construction set named K'nex, and they are tested on the educational shaking table of the Civil Engineering School of the University of Castilla-La Mancha (UCLM) in Spain. The objectives of the proposed methodology are double. On the one hand, it provides students with an intuitive and efficient learning tool to improve their learning experience. On the other hand, the proposed tool illustrates how innovation can be used to efficiently solve problems as complex as the structural health In spite of the importance of structural health monitoring techniques, most universities only address this topic on advanced courses based (almost exclusively) on theoretical classes. There is no doubt that this mathematical approach is a compulsory requirement to achieve a deep understanding of the actual response of the structural systems on site. Nevertheless, many experiences have proved the benefits of adding complementary methodologies to strengthen the students' intuitive perception of this kind of problem. In fact, the traditional teaching procedure has been complemented with new and innovative approaches, such as project-based learning [17][18][19][20][21][22].
The analysis of the literature shows the interest to develop more innovative and efficient teaching methodologies that ease students into understanding structural concepts (such as the dynamic behavior of structures) that are hardly perceived from just the mathematical formulations [23]. For example, many authors (such as those of [24][25][26][27]) have proposed practical activities to monitor the dynamic response of small-scale models on educational shaking tables using low-cost sensors. In fact, experiences learned in this work have proven the learning benefits of including a small-scale model analysis when teaching the dynamic response of structures.
This paper aims to improve students' learning experience of complex concepts (such as the dynamic response of structures) by combining the traditional theoretical classes with more intuitive activities that enable the development of students' intuitiveness. To do so, in this paper, a new educational tool is proposed to monitor the dynamic response of small-scale structures using image-recognition techniques. The analyzed models are built with an economic and easy-to-build construction set named K'nex, and they are tested on the educational shaking table of the Civil Engineering School of the University of Castilla-La Mancha (UCLM) in Spain. The objectives of the proposed methodology are double. On the one hand, it provides students with an intuitive and efficient learning tool to improve their learning experience. On the other hand, the proposed tool illustrates how innovation can be used to efficiently solve problems as complex as the structural health monitoring of structures with low-cost solutions, encouraging students to keep their mind open for innovative solutions for their future engineering problems.
According to similitude theory [28,29], the proposed model has similitude with the real application because the two, the model and the real structure, share geometric similarity, kinematic similarity, and dynamic similarity. However, the model of the present work is just an approximation of reality to, in a simple way, reproduce the behavior of the structure based on the different proposed earthquake-resistant designs. The paper is organized as follows: In Section 2, the modeling of the dynamic response of small-scale buildings in the low-cost shaking table of the UCLM is presented. In Section 3, an algorithm to monitor the dynamic response of buildings by image-recognition techniques is proposed and described in detail. In Section 4, the developed algorithm is applied to an academic example. In addition, different parametric analyses (such as image quality and location of the camera) are carried out to illustrate the influence of these parameters on the accuracy of the estimated response. In Section 5, the application of the proposed tool in a class activity is presented. In this activity, the dynamic response on an educational shaking table of a small-scale building with different structural typologies is evaluated. Finally, in Section 6, some conclusions are drawn.

Simulation of the Dynamic Behavior of Scale Buildings
In this section, the application of the construction set, K'nex, for the construction of small-scale structural models is first reviewed. Then, the main properties of the educational shaking tables used in the literature to teach dynamic concepts are reviewed. Finally, the characteristics of the shaking table used in this work (shaking table of the Civil Engineering School of the UCLM) is described in detail.

Structures Made of K'nex
K'nex [30] is a construction set made of plastic bars and connectors as shown in Figure 2a. This set has been extensively used for the education of civil engineering concepts, strengthening students' curiosity, imagination, and intuitiveness. Examples of the application of this material with educational purposes refer to student competitions (see Figure 2b) in bridges and building construction [22,31]. Other authors have used this material to measure natural frequencies, demonstrate the effect of the rigid/flexible diaphragms in buildings, test the mode shapes of multi-story buildings, or analyze the damper effectiveness of structures [32]. open for innovative solutions for their future engineering problems.
According to similitude theory [28,29], the proposed model has similitude with the real application because the two, the model and the real structure, share geometric similarity, kinematic similarity, and dynamic similarity. However, the model of the present work is just an approximation of reality to, in a simple way, reproduce the behavior of the structure based on the different proposed earthquake-resistant designs.
The paper is organized as follows: In Section 2, the modeling of the dynamic response of small-scale buildings in the low-cost shaking table of the UCLM is presented. In Section 3, an algorithm to monitor the dynamic response of buildings by image-recognition techniques is proposed and described in detail. In Section 4, the developed algorithm is applied to an academic example. In addition, different parametric analyses (such as image quality and location of the camera) are carried out to illustrate the influence of these parameters on the accuracy of the estimated response. In Section 5, the application of the proposed tool in a class activity is presented. In this activity, the dynamic response on an educational shaking table of a small-scale building with different structural typologies is evaluated. Finally, in Section 6, some conclusions are drawn.

Simulation of the Dynamic Behavior of Scale Buildings
In this section, the application of the construction set, K'nex, for the construction of small-scale structural models is first reviewed. Then, the main properties of the educational shaking tables used in the literature to teach dynamic concepts are reviewed. Finally, the characteristics of the shaking table used in this work (shaking table of the Civil Engineering School of the UCLM) is described in detail.

Structures Made of K'nex
K'nex [30] is a construction set made of plastic bars and connectors as shown in Figure 2a. This set has been extensively used for the education of civil engineering concepts, strengthening students' curiosity, imagination, and intuitiveness. Examples of the application of this material with educational purposes refer to student competitions (see Figure  2b) in bridges and building construction [22,31]. Other authors have used this material to measure natural frequencies, demonstrate the effect of the rigid/flexible diaphragms in buildings, test the mode shapes of multi-story buildings, or analyze the damper effectiveness of structures [32]. This extensive use of the K'nex construction set can be explained by the easy connectivity of its elements. Unfortunately, this connection system has the inconvenience of generating flexible connections as some rotation between the bars and the connection is always obtained. Different approaches were presented in the literature to address the stiffness of these connections using laboratory tests [33]. The strength of the K'nex bars has also been characterized by other scholars [34]. This extensive use of the K'nex construction set can be explained by the easy connectivity of its elements. Unfortunately, this connection system has the inconvenience of generating flexible connections as some rotation between the bars and the connection is always obtained. Different approaches were presented in the literature to address the stiffness of these connections using laboratory tests [33]. The strength of the K'nex bars has also been characterized by other scholars [34].
The K'nex bars are divided according to their length and depicted with a different color: green, white, blue, yellow, red, and gray. The structural characteristics of the K'nex bars (color, length, and inertia) are summarized in Table 1 [34]. In this table, the terms Ix, Iy, and Iz refer to the moments of inertia about the axes X, Y, and Z specified in the sketch. All bars have the same cross-sectional area with a value of 0.2513 cm 2 .  Figure 3 presents a picture of an academic example of a small-scale building build with K'nex elements. This structure represents a 3D frame building with four columns and is one-story high. This figure also includes the axes (x, y, and z) used in the model. The K'nex bars are divided according to their length and depicted with a different color: green, white, blue, yellow, red, and gray. The structural characteristics of the K'nex bars (color, length, and inertia) are summarized in Table 1 [34]. In this table, the terms Ix, Iy, and Iz refer to the moments of inertia about the axes X, Y, and Z specified in the sketch. All bars have the same cross-sectional area with a value of 0.2513 cm 2 .  Figure 3 presents a picture of an academic example of a small-scale building build with K'nex elements. This structure represents a 3D frame building with four columns and is one-story high. This figure also includes the axes (x, y, and z) used in the model. One problems of the building models developed with K'nex relates to the reduced mass of the material elements. For that reason, to simulate the dynamic response of the structure, the use of additional elements that provide mass to the model is advised. These elements were chosen as a group of nuts disposed along the bars located at the top story of the building. The characteristics of the used nuts are presented in Table 2. This table also shows the diameter and the unitary weight of each of the four types of nuts used in the simulated structure (M9, M10 andM13). The introduction of these elements into the small-scale model is illustrated in Figure 3. As shown in this figure, 32 nuts (eight units of each type) were symmetrically installed at the four sides of the top story of the model. The total weight of all the used nuts was 408 g. Because the proposed activity had to be performed in 120 min, K'nex pieces were chosen to speed up the assembling process, assuming that this material does not accurately represent the building performance. A clear example of the limitation of this material can be found at the connections between beam and column elements as they are not One problems of the building models developed with K'nex relates to the reduced mass of the material elements. For that reason, to simulate the dynamic response of the structure, the use of additional elements that provide mass to the model is advised. These elements were chosen as a group of nuts disposed along the bars located at the top story of the building. The characteristics of the used nuts are presented in Table 2. This table also shows the diameter and the unitary weight of each of the four types of nuts used in the simulated structure (M9, M10 andM13). The introduction of these elements into the small-scale model is illustrated in Figure 3. As shown in this figure, 32 nuts (eight units of each type) were symmetrically installed at the four sides of the top story of the model. The total weight of all the used nuts was 408 g. Because the proposed activity had to be performed in 120 min, K'nex pieces were chosen to speed up the assembling process, assuming that this material does not accurately represent the building performance. A clear example of the limitation of this material can be found at the connections between beam and column elements as they are not rigid enough to prevent differential rotations. In order to fill this gap, in future works the proposed workshop will be adapted to other more realistic materials (such as micro-concrete) that can better reproduce the seismic performance of the building. In fact, such materials have been widely used in the past to such end (see e.g., [35][36][37]). In addition, the ease of assembly of the K'nex pieces makes it possible to test different solutions proposed by the students during the workshop. Table   A shaking table is a device used for the dynamic excitation of structural models. These kinds of tables can be used in real scale models. For instance, the shaking table of the University of California in San Diego, enables the analysis of buildings with up to five stories. These tools are also traditionally used for the analysis of small-scale structures for educational purposes. In most cases, the excitation used in the educational shaking tables changes from manual control to the electrical/automatic one as shown in the Figure 4a,b, respectively. rigid enough to prevent differential rotations. In order to fill this gap, in future works the proposed workshop will be adapted to other more realistic materials (such as micro-concrete) that can better reproduce the seismic performance of the building. In fact, such materials have been widely used in the past to such end (see e.g., [35][36][37]). In addition, the ease of assembly of the K'nex pieces makes it possible to test different solutions proposed by the students during the workshop. Table   A shaking table is a device used for the dynamic excitation of structural models. These kinds of tables can be used in real scale models. For instance, the shaking table of the University of California in San Diego, enables the analysis of buildings with up to five stories. These tools are also traditionally used for the analysis of small-scale structures for educational purposes. In most cases, the excitation used in the educational shaking tables changes from manual control to the electrical/automatic one as shown in the Figure 4a Various types of shaking tables have been developed by scholars in terms of the load in one or two directions [38]. For instance, the authors of [39] developed an empirical nonlinear model for a servo-hydraulic uniaxial shaking table capable of simulating acceleration, velocity, and position outputs of the system with respect to various types of inputs such as pulse and sinusoidal signals for a different range of frequencies and specimens. Scaled shaking tables have been used in China for investigating the characteristic of the granular landslide deposit affected by vertical and horizontal seismic waves [40]. The shaking table of Sharif University in Tehran, Iran, has been used to simulate earthquakes including landslide displacement on the slopes [41].

Shaking
The construction cost of shaking tables plays an important role when the device is built for educational purposes, as in this case, very limited funding options are traditionally available. For this reason, to illustrate the structural mechanism to students, low-cost solutions are conventionally developed. This is the case of the present work, as a low-cost shaking table was used. This table is presented in Figure 4b, and it was developed by the CEU San Pablo university for the Civil Engineering School at the University of Castilla-La Mancha (UCLM) in Spain for educational purposes. The excitation mechanism of this table is based on a drill, PSB 650 RE Bosh model, that produces a sinusoidal excitation, the frequency of which is controlled with a programmable DC lab power supply (LABPS3005DN model).
In the last years, the development of low-cost sensors controlled by open-source microcontrollers [42] has propagated an authentic educational revolution. In fact, the use of these techniques is introduced more and more frequently in high school and university courses [43]. For example, many scholars have monitored the dynamic response of smallscale structures with this system (see e.g., [44,45]) by establishing a low-cost Arduinobased single-axis shaking table with a maximum frequency of 17 Hz and a speed as high Various types of shaking tables have been developed by scholars in terms of the load in one or two directions [38]. For instance, the authors of [39] developed an empirical nonlinear model for a servo-hydraulic uniaxial shaking table capable of simulating acceleration, velocity, and position outputs of the system with respect to various types of inputs such as pulse and sinusoidal signals for a different range of frequencies and specimens. Scaled shaking tables have been used in China for investigating the characteristic of the granular landslide deposit affected by vertical and horizontal seismic waves [40]. The shaking table of Sharif University in Tehran, Iran, has been used to simulate earthquakes including landslide displacement on the slopes [41].
The construction cost of shaking tables plays an important role when the device is built for educational purposes, as in this case, very limited funding options are traditionally available. For this reason, to illustrate the structural mechanism to students, low-cost solutions are conventionally developed. This is the case of the present work, as a lowcost shaking table was used. This table is presented in Figure 4b, and it was developed by the CEU San Pablo university for the Civil Engineering School at the University of Castilla-La Mancha (UCLM) in Spain for educational purposes. The excitation mechanism of this table is based on a drill, PSB 650 RE Bosh model, that produces a sinusoidal excitation, the frequency of which is controlled with a programmable DC lab power supply (LABPS3005DN model).
In the last years, the development of low-cost sensors controlled by open-source microcontrollers [42] has propagated an authentic educational revolution. In fact, the use of these techniques is introduced more and more frequently in high school and university courses [43]. For example, many scholars have monitored the dynamic response of smallscale structures with this system (see e.g., [44,45]) by establishing a low-cost Arduino-based single-axis shaking table with a maximum frequency of 17 Hz and a speed as high as 350 mm/s. The authors of [46] also proposed educational shaking tables monitored using low-cost LVDT (Linear variable differential transformer) sensors for an engineering college in India. In the following section, a new tool based on image-recognition techniques proposed to monitor the dynamic response of small-scale structures on educational shaking tables is described.

Characterization of the Dynamic Behavior of Structures with Image-Recognition Techniques
In this section, a low-cost procedure is proposed for the characterization of the dynamic behavior of small-scale structures. The proposed tool is used to improve the teaching experience in the subject "Building Design" of the Master's in Civil Engineering at UCLM. This subject introduces students into the static and dynamic design of buildings using a mathematical approach, and it has a duration of 45 h. Out of these 45 h, three are focused on the analysis of the building typologies against seismic loads. These seismic lectures are complemented with the 45 min voluntary workshop proposed in this paper, which was also proposed to all the students of the Civil Engineering School.
The idea of the proposed tool was initiated from the concern of the professors to provide a new educational tool to develop the students' intuition on the structural response of structures under dynamic loads. This tool is based on an image-recognition algorithm developed by the authors in MATLAB [47]. Obviously, the application of the proposed tool is not limited to small-scale buildings as it can be easily adapted for educational purposes to the study of many other engineering fields (such as transportation, mechanical engineering, industrial engineering, or robotics, among many others).

Algorithm for Dynamic Analysis from Image-Recognition Techniques
The developed algorithm applies image-recognition techniques to the different frames of the small-scale structure movement that has been recorded by a camera (Figure 5a). In each of these frames, the location of a set of visual targets (Figure 5b) is identified by the analysis of the image pixels. To ease the identification of these target points, a black background is placed behind the structure. A graphical scale is also placed at the base of the shaking table to transform pixels into centimeters in order to identify the magnitude of the movements. Once the positions of the target points have been determined, the time spacing among frames can be used to define both the speed and the acceleration of the different stories over time.
as 350 mm/s. The authors of [46] also proposed educational shaking tables monitored using low-cost LVDT (Linear variable differential transformer) sensors for an engineering college in India. In the following section, a new tool based on image-recognition techniques proposed to monitor the dynamic response of small-scale structures on educational shaking tables is described.

Characterization of the Dynamic Behavior of Structures with Image-Recognition Techniques
In this section, a low-cost procedure is proposed for the characterization of the dynamic behavior of small-scale structures. The proposed tool is used to improve the teaching experience in the subject "Building Design" of the Master's in Civil Engineering at UCLM. This subject introduces students into the static and dynamic design of buildings using a mathematical approach, and it has a duration of 45 h. Out of these 45 h, three are focused on the analysis of the building typologies against seismic loads. These seismic lectures are complemented with the 45 min voluntary workshop proposed in this paper, which was also proposed to all the students of the Civil Engineering School.
The idea of the proposed tool was initiated from the concern of the professors to provide a new educational tool to develop the students' intuition on the structural response of structures under dynamic loads. This tool is based on an image-recognition algorithm developed by the authors in MATLAB [47]. Obviously, the application of the proposed tool is not limited to small-scale buildings as it can be easily adapted for educational purposes to the study of many other engineering fields (such as transportation, mechanical engineering, industrial engineering, or robotics, among many others).

Algorithm for Dynamic Analysis from Image-Recognition Techniques
The developed algorithm applies image-recognition techniques to the different frames of the small-scale structure movement that has been recorded by a camera ( Figure  5a). In each of these frames, the location of a set of visual targets (Figure 5b) is identified by the analysis of the image pixels. To ease the identification of these target points, a black background is placed behind the structure. A graphical scale is also placed at the base of the shaking table to transform pixels into centimeters in order to identify the magnitude of the movements. Once the positions of the target points have been determined, the time spacing among frames can be used to define both the speed and the acceleration of the different stories over time.  The proposed algorithm for the dynamic analysis is as follows: • Input: A video of at least 10 s where the camera has recorded the movement of the building. • Outputs: The time-dependent position, speed, and acceleration of each target point (i.e., of each story of the building) obtained from the analysis of each frame of the recorded video.

•
Step 0: reading the video and setting the reference values. The recorded video must be read in order to get the number of frames per second (fps) that implies the time increment (∆t) that will be used to derive the speeds and acceleration of each story. For a better application of the image-recognition techniques, the RGB video must be converted to grayscale, eliminating the hue and saturation information while retaining the luminance. It is also necessary to set the number of seconds (n_sec) to analyze the building movement and the length (L) of the graphical scale so the transformation from pixels to centimeters can be carried out.

•
Step 1: building characterization. Using the first frame of the video, some information of the building is collected to better perform each image analysis. In particular, • Step 1.1: determining the color of the target spot. To obtain a good threshold value for Step 2, pick some samples of color (5-10) of one of the target spots located at the stories. This sample is stored in ref_color.

•
Step 1.2: determining the radius of the target spot. Using the frame, measure (in pixels) the radius (rt) of the target spot.

•
Step 1.3: determining the number and height of each building story. Using the frame, determine a preliminary (z_sˆ0) position, the height (h_s) of each story (s) from a total of number of stories(n_s).

•
Step 1.4: determining scale factor. Using the frame, determine the length (L_p) in pixels of the graphical scale and obtain the scale factor to transform pixels into centimeters as sf = L/L_p. Set the number of analyzed frames equal to 1, i.e., f = 1. and go to Step 2.

•
Step 2: image thresholding. Using the histogram of frame f and ref_color, threshold the image so that the colors in ref_color go to white and the rest go to black. Compute and fill connected components in order to better identify the target spots in white. Go to Step 3.

•
Step 3: image binarizing. Binarize the image obtained in Step 2 so that pixels in white take a value of 1 and 0 otherwise. Set s = 1 and go to Step 4.

•
Step 4: calculating the position of each target point. We assume that the position of the target point of the story, s, is the center point (x_s, z_s), of the circle of radius rt (defined in Step 1.2), which maximizes the number of ones inside of it. For that, the algorithm moves a dummy circle looking for this maximum in a searching band defined as showed in Figure 6. Since the obtained center point has its coordinates in pixels, the scale factor, sf, must be used to transform pixels into centimeters and stored them in the results matrix. If s < ns, do s = s + 1 and repeat Step 4. If s = ns another frame must be analyzed if possible. Then, if f < n_sec xfps, do f = f + 1 and go to Step 2. Otherwise go to Step 5.

•
Step 5: getting the results. Once all the desired frames are analyzed the results matrix is used to derive the movement of the building target points, their maximum displacements, their velocities, and their accelerations. In the following sections, two examples of growing complexity are presented to illustrate the applicability of this algorithm.

Validation of the Developed Algorithm
This section describes how the developed image-recognition algorithm was applied to a scale building built with K'nex and tested on the shaking table presented in Section 2. To evaluate the accuracy of the estimations for different resolutions and camera locations, a set of parametric analyses were also carried out. Finally, to validate the proposed methodology, the results of the proposed algorithm were compared with those obtained

Validation of the Developed Algorithm
This section describes how the developed image-recognition algorithm was applied to a scale building built with K'nex and tested on the shaking table presented in Section 2.
To evaluate the accuracy of the estimations for different resolutions and camera locations, a set of parametric analyses were also carried out. Finally, to validate the proposed methodology, the results of the proposed algorithm were compared with those obtained with a low-cost accelerometer.

Application of the Image-Recognition Algorithm
This section discusses how the proposed image-recognition algorithm was applied to the one-story building presented in Figure 7. A target point (white connector at midspan) was included at each story level to monitor the dynamic response in the shaking table excitation axis. A low-cost camera (model Nikon Coolpix A100, with a cost of approximately 60€) with a maximum resolution of 20.1 megapixels and 25 frames per second was used to record the building's movements on the shaking table. From these recorded information, displacements, velocities, and accelerations were obtained by the algorithm presented in Section 3. In the recording process, the camera resolution was fixed to 20.1 megapixels, and it was located at a distance of 50 cm from the model. The deflections obtained at the two target points (top and base levels) by the image-recognition algorithm are presented in Figure 7. In the following sections, two examples of growing complexity are presented to illustrate the applicability of this algorithm.

Validation of the Developed Algorithm
This section describes how the developed image-recognition algorithm was applied to a scale building built with K'nex and tested on the shaking table presented in Section 2. To evaluate the accuracy of the estimations for different resolutions and camera locations, a set of parametric analyses were also carried out. Finally, to validate the proposed methodology, the results of the proposed algorithm were compared with those obtained with a low-cost accelerometer.

Application of the Image-Recognition Algorithm
This section discusses how the proposed image-recognition algorithm was applied to the one-story building presented in Figure 7. A target point (white connector at midspan) was included at each story level to monitor the dynamic response in the shaking table excitation axis. A low-cost camera (model Nikon Coolpix A100, with a cost of approximately 60€) with a maximum resolution of 20.1 megapixels and 25 frames per second was used to record the building's movements on the shaking table. From these recorded information, displacements, velocities, and accelerations were obtained by the algorithm presented in Section 3. In the recording process, the camera resolution was fixed to 20.1 megapixels, and it was located at a distance of 50 cm from the model. The deflections obtained at the two target points (top and base levels) by the image-recognition algorithm are presented in Figure 7.   The analysis of Figure 7 shows how the proposed algorithm adequately identifies the sinusoidal movements of the shaking table. In addition, as expected, this figure shows that the movement of both nodes was properly synchronized and that the top node presented higher movement amplitudes. Figure 7 also illustrates an asymmetric response of the structure as the maximum positive and negative values of the top node were different. In fact, the maximum positive displacements (3.35 cm for the top node and 2.366 cm for the base node) were higher than the negative ones (−2.504 cm for the top node and −2.317 cm for the base node). These differences might be explained by the wrong calibration of the shaking tables as the movement in one direction was higher than in the other. Nevertheless, this lack in calibration does not jeopardize the applicability of the proposed methodology for educational purposes.
The velocities obtained at the two target points by the image-recognition technique from the analysis of the deflections are presented in Figure 8.
The analysis of Figure 8 shows a good agreement between the velocities of both nodes. Obviously, higher velocities were obtained at the top node, and that story was also affected by the structure's flexibility. In addition, null velocities were measured in both nodes when the amplitudes of their deflections were maximal. A slight offset of the measurement sets was obtained from the numerical integration. As in the case of the deflections, the lack of calibration of the shaking table produced differences between the maximum and the minimum measured velocities. In fact, the maximum positive velocity measured at the top node was −40.5 cm/s, while the minimum one was 30.1 cm/s. sented higher movement amplitudes. Figure 7 also illustrates an asymmetric response of the structure as the maximum positive and negative values of the top node were different. In fact, the maximum positive displacements (3.35 cm for the top node and 2.366 cm for the base node) were higher than the negative ones (−2.504 cm for the top node and −2.317 cm for the base node). These differences might be explained by the wrong calibration of the shaking tables as the movement in one direction was higher than in the other. Nevertheless, this lack in calibration does not jeopardize the applicability of the proposed methodology for educational purposes.
The velocities obtained at the two target points by the image-recognition technique from the analysis of the deflections are presented in Figure 8. The analysis of Figure 8 shows a good agreement between the velocities of both nodes. Obviously, higher velocities were obtained at the top node, and that story was also affected by the structure's flexibility. In addition, null velocities were measured in both nodes when the amplitudes of their deflections were maximal. A slight offset of the measurement sets was obtained from the numerical integration. As in the case of the deflections, the lack of calibration of the shaking table produced differences between the maximum and the minimum measured velocities. In fact, the maximum positive velocity measured at the top node was −40.5 cm/s, while the minimum one was 30.1 cm/s. The accelerations obtained at the two target points by the image-recognition technique from the analysis of the velocities are presented in Figure 9.
The analysis of Figure 9 shows that the maximum accelerations at the top of the structure corresponded with the points with the higher displacement and null velocity. Nevertheless, unlike the deflections and the velocities, the accelerations were not properly obtained by the algorithm throughout the time due to errors in the numerical integration of the velocities. In fact, this figure shows the asymmetrical response of the nodes in the structure. The higher values of the accelerations were measured at the top node and exceeded −500 and 500 cm/s 2 . The accelerations obtained at the two target points by the image-recognition technique from the analysis of the velocities are presented in Figure 9. The following section describes two parametric analyses carried out to evaluate the influence on the results of the image-recognition method of the camera resolution and its distance to the shaking table.

Parametric Analysis of the Camera Location
In this parametric analysis, the effect of the camera location was studied. To do so, structural responses obtained by four different camera locations (50, 100, 150, and 200 cm) were compared. The camera resolution in all these analyses was fixed as 20.1 megapixels and 25 frames per second. The obtained deflections, velocities, and accelerations at the top node are summarized in Figures 10-12, respectively.  The analysis of Figure 9 shows that the maximum accelerations at the top of the structure corresponded with the points with the higher displacement and null velocity. Nevertheless, unlike the deflections and the velocities, the accelerations were not properly obtained by the algorithm throughout the time due to errors in the numerical integration of the velocities. In fact, this figure shows the asymmetrical response of the nodes in the structure. The higher values of the accelerations were measured at the top node and exceeded −500 and 500 cm/s 2 .
The following section describes two parametric analyses carried out to evaluate the influence on the results of the image-recognition method of the camera resolution and its distance to the shaking table.

Parametric Analysis of the Camera Location
In this parametric analysis, the effect of the camera location was studied. To do so, structural responses obtained by four different camera locations (50,100,150, and 200 cm) were compared. The camera resolution in all these analyses was fixed as 20.1 megapixels and 25 frames per second. The obtained deflections, velocities, and accelerations at the top node are summarized in Figures 10-12, respectively. influence on the results of the image-recognition method of the camera resolution and its distance to the shaking table.

Parametric Analysis of the Camera Location
In this parametric analysis, the effect of the camera location was studied. To do so, structural responses obtained by four different camera locations (50, 100, 150, and 200 cm) were compared. The camera resolution in all these analyses was fixed as 20.1 megapixels and 25 frames per second. The obtained deflections, velocities, and accelerations at the top node are summarized in Figures 10-12, respectively.   The analysis of Figure 10 shows slight differences between the maximum and mini-  The analysis of Figure 10 shows slight differences between the maximum and minimum deflections obtained by the developed tool for different camera distances. In fact, the higher the distance of the camera from the shaking table, the higher the amplitude of the movement obtained by the algorithm. For example, the maximum negative amplitude The analysis of Figure 10 shows slight differences between the maximum and minimum deflections obtained by the developed tool for different camera distances. In fact, the higher the distance of the camera from the shaking table, the higher the amplitude of the movement obtained by the algorithm. For example, the maximum negative amplitude changed from −2.725 to −3.013 cm when the camera distance was increased from 50 to 200 cm. An intrinsic characteristic that it is not affected by the camera distance is the movement period, as for all four analyzed cases it remained constant with a value of 0.645 s.
The analysis of Figure 11 shows that a good agreement of the overall response was obtained by the four analyzed distances. Nevertheless, as in the case of the deflections, slight differences of the maximum values appeared. In this case, higher velocities were usually obtained for the higher distances between the camera and the shaking table. The maximum velocity −49.3 cm/s was obtained at the 200 cm distance. Figure 12 shows an overall agreement of the accelerations at the top node measured by the developed algorithm for the four analyzed distances. The highest acceleration values were obtained for the 100 cm distance.

Parametric Analysis of the Camera Resolution
In this parametric analysis, the effects of the camera resolution were studied. To do so, structural responses obtained by two different resolutions with the same low-cost camera Video Graphics Array (VGA): 640 × 480 pixels and 0.3 megapixels and high quality (HQ): 5000 × 4000 pixels and 20.1 megapixels) were compared. The camera location in these analyses was fixed at 50 cm. The obtained deflections, velocities, and accelerations at the top node are summarized in Figures 13-15

Parametric Analysis of the Camera Resolution
In this parametric analysis, the effects of the camera resolution were studied. To do so, structural responses obtained by two different resolutions with the same low-cost camera Video Graphics Array (VGA): 640 × 480 pixels and 0.3 megapixels and high quality (HQ): 5000 × 4000 pixels and 20.1 megapixels) were compared. The camera location in these analyses was fixed at 50 cm. The obtained deflections, velocities, and accelerations at the top node are summarized in Figures 13-15, respectively.

Parametric Analysis of the Camera Resolution
In this parametric analysis, the effects of the camera resolution were studied. To do so, structural responses obtained by two different resolutions with the same low-cost camera Video Graphics Array (VGA): 640 × 480 pixels and 0.3 megapixels and high quality (HQ): 5000 × 4000 pixels and 20.1 megapixels) were compared. The camera location in these analyses was fixed at 50 cm. The obtained deflections, velocities, and accelerations at the top node are summarized in Figures 13-15, respectively.    The analysis of Figure 13 shows negligible differences in terms of the deflections obtained by the developed tool for different camera resolutions. In fact, the maximum and minimum values obtained for both resolutions were practically the same.
The analysis of Figure 14 shows a good agreement of the overall response was obtained by the two analyzed resolutions. Nevertheless, slight differences of the maximum values and minimum value appeared. As in the case of the distance analysis, higher velocities were usually obtained for lower camera precisions. In fact, the maximum velocity (−44.6 cm/s) obtained for the VGA precision was higher than the one obtained for the HQ precision (−39.5 cm/s). Figure 15 shows an overall agreement of the accelerations at the top node measured by the developed algorithm for the two camera resolutions. The highest acceleration values were obtained for the 100 cm distance.

Application of the Proposed Tool for the Dynamic Analysis of High-Rise Building in a Workshop
To illustrate in class the response of high-rise buildings to seismic loads, a workshop was introduced in the "Building Design" subject. Students were invited to participate in the workshop conducted the 16 November 2020. In the workshop, the proposed imagerecognition algorithm was applied for the dynamic analysis of a high-rise building. The analyzed structure corresponded with the six-story building presented in Figure 16a. This figure shows how a target point (white connector) was introduced at each story level. An image of the video introduced into the algorithm is presented in Figure 16b. This video was recorded with a camera resolution of 20.1 megapixels, located 50 cm from the structure. The location of the target points obtained by the image-recognition algorithm are presented in Figure 16c. The analysis of this information can be used to define the lumped mass model of the building. The analysis of Figure 13 shows negligible differences in terms of the deflections obtained by the developed tool for different camera resolutions. In fact, the maximum and minimum values obtained for both resolutions were practically the same.
The analysis of Figure 14 shows a good agreement of the overall response was obtained by the two analyzed resolutions. Nevertheless, slight differences of the maximum values and minimum value appeared. As in the case of the distance analysis, higher velocities were usually obtained for lower camera precisions. In fact, the maximum velocity (−44.6 cm/s) obtained for the VGA precision was higher than the one obtained for the HQ precision (−39.5 cm/s). Figure 15 shows an overall agreement of the accelerations at the top node measured by the developed algorithm for the two camera resolutions. The highest acceleration values were obtained for the 100 cm distance.

Application of the Proposed Tool for the Dynamic Analysis of High-Rise Building in a Workshop
To illustrate in class the response of high-rise buildings to seismic loads, a workshop was introduced in the "Building Design" subject. Students were invited to participate in the workshop conducted the 16 November 2020. In the workshop, the proposed image-recognition algorithm was applied for the dynamic analysis of a high-rise building. The analyzed structure corresponded with the six-story building presented in Figure 16a. This figure shows how a target point (white connector) was introduced at each story level. An image of the video introduced into the algorithm is presented in Figure 16b. This video was recorded with a camera resolution of 20.1 megapixels, located 50 cm from the structure. The location of the target points obtained by the image-recognition algorithm are presented in Figure 16c. The analysis of this information can be used to define the lumped mass model of the building.
In this activity, groups of three students were challenged to improve the response of the reference structure presented in Figure 17. As stated by a number of scholars (see e.g., [48]) hands-on experiences have great benefits for students, such as, strengthening learning, motivating themselves, and helping to develop imagination and creativity. To illustrate the presented solutions, the following five designs were selected. (1) Shear wall in Figure 17a: This wall was modeled as an x-bracing façade in the direction of the shaking table movement. The stair core was materialized as a rigid truss situated out of the building section. (2) Core in the center presented in Figure 17b: The stair core was situated close to the center or the building section. In this activity, groups of three students were challenged to improve the response of the reference structure presented in Figure 17. As stated by a number of scholars (see e.g., [48]) hands-on experiences have great benefits for students, such as, strengthening learning, motivating themselves, and helping to develop imagination and creativity. To illustrate the presented solutions, the following five designs were selected. (1) Shear wall in Figure 17a: This wall was modeled as an x-bracing façade in the direction of the shaking table movement. The stair core was materialized as a rigid truss situated out of the building section. (2) Core in the center presented in Figure 17b: The stair core was situated close to the center or the building section. (3) Core in the outer face as presented in Figure 17c. (4) Belt truss as presented in Figure 17d: This truss was materialized as an x-bracing placed between the second and the third story. (5) Damper weight at the top story as presented in Figure 17e: This damper was materialized as two heavy nuts (50 g each) hung from the roof. This solution imitates that used in the Taipei 101 building in Taiwan. A comparison between the maximum deformations obtained by the five designs proposed by the students and those of the reference model is presented in Figure 18. This table shows that all the proposed designs improved the seismic behavior of the reference value. Among these models, the effectiveness of the belt truss, the core in the center, the  In this activity, groups of three students were challenged to improve the response of the reference structure presented in Figure 17. As stated by a number of scholars (see e.g., [48]) hands-on experiences have great benefits for students, such as, strengthening learning, motivating themselves, and helping to develop imagination and creativity. To illustrate the presented solutions, the following five designs were selected. (1) Shear wall in Figure 17a: This wall was modeled as an x-bracing façade in the direction of the shaking table movement. The stair core was materialized as a rigid truss situated out of the building section. (2) Core in the center presented in Figure 17b: The stair core was situated close to the center or the building section. (3) Core in the outer face as presented in Figure 17c.  A comparison between the maximum deformations obtained by the five designs proposed by the students and those of the reference model is presented in Figure 18. This table shows that all the proposed designs improved the seismic behavior of the reference value. Among these models, the effectiveness of the belt truss, the core in the center, the A comparison between the maximum deformations obtained by the five designs proposed by the students and those of the reference model is presented in Figure 18. This table shows that all the proposed designs improved the seismic behavior of the reference value. Among these models, the effectiveness of the belt truss, the core in the center, the damper at the top, and the shear wall are highlighted as the maximum obtained deflections were practically zero. On the other hand, the worst response was measured at the asymmetric solution (the core in the outer façade).
In order to evaluate the learning effectiveness, a set of surveys were conducted and evaluated according to the Attention, Relevance, Confidence, and Satisfaction (ARCS) model described in the following section. damper at the top, and the shear wall are highlighted as the maximum obtained deflections were practically zero. On the other hand, the worst response was measured at the asymmetric solution (the core in the outer façade). In order to evaluate the learning effectiveness, a set of surveys were conducted and evaluated according to the Attention, Relevance, Confidence, and Satisfaction (ARCS) model described in the following section.

Attention, Relevance, Confidence, and Satisfaction (ARCS) Model
Motivation is a basic parameter to be considered to understand human behaviors, and it plays a key role in the teaching-learning process (see e.g., [49,50]). The main goal of the workshop was to motivate students with experimentation, while giving them tangible tools to understand advanced structural concepts. In this regard, we applied the Attention, Relevance, Confidence, and Satisfaction (ARCS) [51] learning motivation model to (1) validate our methodology, (2) verify the ability of students to improve learning through active teaching, and (3) check that those kinds of activities can stimulate learning confidence and, at the same time, effectively improve students' learning satisfaction as well as learning effectiveness.
The ARCS model has been applied in a variety of educational settings, in different subject areas, and many countries (such as [52,53]).
In the presented workshop, the ARCS model parameters were evaluated through a questionnaire organized as follows:


Attention: five questions related to learning interests before the activity.  Relevance: five technological questions related to the concepts explained during the activity, to check learning effectiveness.  Confidence: five questions to measure their self-perception of fulfilling a task.  Satisfaction: five questions to learn about students' opinions on the suitability of the methodology used.
The survey was organized as a four-point Likert scale, which is, basically, a forced scale, where the user is forced to form an opinion because there is no "neutral" option. In addition, some short-answer questions were included. Survey questions related to attention, confidence, and satisfaction are included in Figure 19.

Attention, Relevance, Confidence, and Satisfaction (ARCS) Model
Motivation is a basic parameter to be considered to understand human behaviors, and it plays a key role in the teaching-learning process (see e.g., [49,50]). The main goal of the workshop was to motivate students with experimentation, while giving them tangible tools to understand advanced structural concepts. In this regard, we applied the Attention, Relevance, Confidence, and Satisfaction (ARCS) [51] learning motivation model to (1) validate our methodology, (2) verify the ability of students to improve learning through active teaching, and (3) check that those kinds of activities can stimulate learning confidence and, at the same time, effectively improve students' learning satisfaction as well as learning effectiveness.
The ARCS model has been applied in a variety of educational settings, in different subject areas, and many countries (such as [52,53]).
In the presented workshop, the ARCS model parameters were evaluated through a questionnaire organized as follows: • Attention: five questions related to learning interests before the activity. • Relevance: five technological questions related to the concepts explained during the activity, to check learning effectiveness. • Confidence: five questions to measure their self-perception of fulfilling a task. • Satisfaction: five questions to learn about students' opinions on the suitability of the methodology used.
The survey was organized as a four-point Likert scale, which is, basically, a forced scale, where the user is forced to form an opinion because there is no "neutral" option. In addition, some short-answer questions were included. Survey questions related to attention, confidence, and satisfaction are included in Figure 19.
As the workshop was held during the COVID-19 global pandemic, some additional sanitary precautions (such as social distance or the use of masks and hydrogels) were adopted. In fact, to evaluate the students' motivation under these circumstances, a virtual survey was conducted. For this, students accessed different google forms via QR codes showed on the screen wall (see Figure 20). The results of the survey are summarized in  As the workshop was held during the COVID-19 global pandemic, some additional sanitary precautions (such as social distance or the use of masks and hydrogels) were adopted. In fact, to evaluate the students' motivation under these circumstances, a virtual survey was conducted. For this, students accessed different google forms via QR codes showed on the screen wall (see Figure 20). The results of the survey are summarized in Figures 21-23.
The students who attend the workshops, during all editions, were mostly first-year master's students. These students are therefore students who already hold the Degree of Civil Engineering. This means that during the degree they have taken subjects on the basic theory of structures but have not experienced anything, or very little, on the seismic behavior of structures. Students were mostly aged between 22 and 24.   Figure 19. Questions relative to attendance, confidence, and satisfaction according to the Attention, Relevance, Confidence and Satisfaction (ARCS) model.
As the workshop was held during the COVID-19 global pandemic, some additional sanitary precautions (such as social distance or the use of masks and hydrogels) were adopted. In fact, to evaluate the students' motivation under these circumstances, a virtual survey was conducted. For this, students accessed different google forms via QR codes showed on the screen wall (see Figure 20). The results of the survey are summarized in Figures 21-23.
The students who attend the workshops, during all editions, were mostly first-year master's students. These students are therefore students who already hold the Degree of Civil Engineering. This means that during the degree they have taken subjects on the basic theory of structures but have not experienced anything, or very little, on the seismic behavior of structures. Students were mostly aged between 22 and 24.     The students who attend the workshops, during all editions, were mostly first-year master's students. These students are therefore students who already hold the Degree of Civil Engineering. This means that during the degree they have taken subjects on the basic theory of structures but have not experienced anything, or very little, on the seismic behavior of structures. Students were mostly aged between 22 and 24.
The analysis of the obtained results showed that students were generally motivated to come to the activity, and their expectations, from their answers to the first question, were high and very well directed, e.g., "I have come because I think I need to improve my knowledge into issues related to the dynamic behavior of buildings", "to learn the possible response of a structure to seismic loads", or "to learn the mechanisms of resistance to an earthquake".
The previous knowledge of students is analyzed in Figure 21a,b. On the one hand, the former of these figures shows that, before the activity, 77.7% of the students scored their previous knowledge as low as 1 or 2. On the other hand, Figure 21b illustrates that more than 80% of the students expressed their reduced ability to predict the dynamic response of buildings. Figure 22 presents the students' perception about the utility of the workshop to better understand the dynamic response of buildings. This figure shows that all the students rated their level of understanding and assimilation of the concepts as 3-4. According to the survey, it can be stated that most of the students considered that the used methodology helps to reach a better level of understanding (as summarized in Figure 23a, 94% of students rate their understanding with a 4/4 and the other 6% rate it with a 3/4). Another important parameter, which shows that the students consider the workshop interesting, is that, as can be seen in Figure 23b, all the students would recommend to a classmate participation in a similar workshop in the future.
The answers to the technical questions (in Figure 24, some of these technical questions are shown) were evaluated before and after the activity to analyze students previous knowledge in seismic analysis of structures, as well as to measure and quantify their learning. The results of this analysis showed that the number of right answers (36% before activity) was significantly increased after the workshop (93%).
ble response of a structure to seismic loads", or "to learn the mechanisms of resistance to an earthquake".
The previous knowledge of students is analyzed in Figure 21a,b. On the one hand, the former of these figures shows that, before the activity, 77.7% of the students scored their previous knowledge as low as 1 or 2. On the other hand, Figure 21b illustrates that more than 80% of the students expressed their reduced ability to predict the dynamic response of buildings. Figure 22 presents the students' perception about the utility of the workshop to better understand the dynamic response of buildings. This figure shows that all the students rated their level of understanding and assimilation of the concepts as 3-4. According to the survey, it can be stated that most of the students considered that the used methodology helps to reach a better level of understanding (as summarized in Figure 23a, 94% of students rate their understanding with a 4/4 and the other 6% rate it with a 3/4). Another important parameter, which shows that the students consider the workshop interesting, is that, as can be seen in Figure 23b, all the students would recommend to a classmate participation in a similar workshop in the future.
The answers to the technical questions (in Figure 24, some of these technical questions are shown) were evaluated before and after the activity to analyze students´ previous knowledge in seismic analysis of structures, as well as to measure and quantify their learning. The results of this analysis showed that the number of right answers (36% before activity) was significantly increased after the workshop (93%). Figure 24. Technical questions to measure the improvement of the students before and after the workshop. Figure 24. Technical questions to measure the improvement of the students before and after the workshop.

Conclusions
This paper proposes to improve the learning experience of university students by introducing in-class activities that strengthen their structural intuition. To do so, an imagerecognition tool algorithm is proposed to identify the dynamic response (deflections, velocity, and accelerations) of small-scale buildings on an educational shaking table. To evaluate the applicability of this tool, the dynamic response of a simple K'nex building on the educational shaking table of the Civil Engineering School of UCLM was studied. In addition, the effects of both the camera distance to the shaking table and the camera resolution were studied. In both analyzed studies, the period of filming the structure remained constant independently. Finally, the applicability of the proposed tool in an educational activity in a master level subject is presented. In this activity, students were challenged to improve the seismic behavior of a reference small-scale building. Then, the proposed algorithm was