Lumped-Mass Models & Forced Vibration Explained in MATLAB (2024)

  1. Homepage
  2. Blog
  3. Lumped-Mass Models & Forced Vibration Explained in MATLAB

August 17, 2024

Lumped-Mass Models & Forced Vibration Explained in MATLAB (1)

Dr. Alex Thompson

Australia

Forced Vibration

Dr. Alex Thompson with over 8 years of experience, earned his Ph.D. in Mechanical Engineering from the University of Melbourne, Australia.

Hire Me to Do Your Forced Vibration Assignment

Vibration analysis is a fundamental aspect of engineering and physics, playing a critical role in the design and analysis of mechanical systems. For students studying these disciplines, MATLAB often becomes an essential tool for solving vibration-related assignments. These tasks require not only a strong understanding of the theoretical concepts but also the ability to translate these concepts into practical, computational solutions. This blog will walk you through the key aspects of vibration analysis and provide guidance on how to effectively solve your Matlab assignment.

Understanding the Problem Statement

The first and most crucial step in any assignment is to thoroughly understand the problem statement. Whether the assignment involves forced vibration response, modal analysis, or impulse response, a clear understanding of what is being asked is essential for success. Forced Vibration assignment typically combine theoretical derivations with computational analysis. They may require you to model a physical system, derive equations of motion, and solve these equations using MATLAB. This combination can be daunting, but breaking down the problem into manageable steps can help.

Key Questions to Ask:

Lumped-Mass Models & Forced Vibration Explained in MATLAB (2)

  • What physical system is being modeled?
  • What are the key parameters (e.g., mass, stiffness, damping)?
  • What type of vibration is being analyzed (free, forced, damped, undamped)?
  • Are there any specific outputs required, such as frequency response or time-domain analysis?

By answering these questions, you can gain a clearer understanding of the problem and start planning your approach.

Forced Vibration Response Over Frequency and Damping Ratio

Forced vibration occurs when an external force drives a system. The system's response depends on the frequency of the external force and the damping ratio of the system. The damping ratio determines whether the system is underdamped (oscillatory response), critically damped (fastest non-oscillatory response), or overdamped (slow non-oscillatory response).

Setting Up the Differential Equations

The starting point for analyzing forced vibration is setting up the differential equation that governs the system's motion. For a simple mass-spring-damper system, the equation might look like:

Lumped-Mass Models & Forced Vibration Explained in MATLAB (3)

Where:

  • mmm is the mass,
  • ccc is the damping coefficient,
  • kkk is the stiffness,
  • xxx is the displacement,
  • F(t)F(t)F(t) is the external force as a function of time.

Using MATLAB’s ode45 Function

MATLAB’s ode45 solver is ideal for solving ordinary differential equations (ODEs) numerically. The ode45 function is based on an adaptive step-size Runge-Kutta method, making it well-suited for most ODEs.

Example:

Suppose you need to find the response of a mass-spring-damper system to a harmonic force F(t)=F0cos⁡(ωt)F(t) = F_0 \cos(\omega t)F(t)=F0cos(ωt). You can set up the ODE in MATLAB as follows:

m = 1; % Massc = 0.1; % Damping coefficientk = 10; % StiffnessF0 = 1; % Amplitude of the external forceomega = 2; % Frequency of the external force% Define the ODE as a function handleodefun = @(t, x) [x(2); (F0*cos(omega*t) - c*x(2) - k*x(1))/m];% Solve the ODE using ode45[t, x] = ode45(odefun, [0 10], [0 0]);% Plot the displacement responseplot(t, x(:,1));xlabel('Time (s)');ylabel('Displacement (m)');title('Forced Vibration Response');

Analyzing the Frequency Response

The frequency response of the system shows how it responds to different frequencies of the external force. MATLAB’s Fast Fourier Transform (FFT) function can help analyze this response.

Example:

Y = fft(x(:,1));f = (0:length(Y)-1)*Fs/length(Y); % Frequency vectorplot(f, abs(Y));xlabel('Frequency (Hz)');ylabel('Magnitude');title('Frequency Response');

In this example, Fs is the sampling frequency, and the fft function is used to compute the frequency spectrum of the displacement response.

Lumped-Mass Model for Beam

When analyzing a beam, it’s common to model it as a series of lumped masses connected by springs. This simplification allows you to use matrix methods to analyze the system.

Dividing the Beam into Segments

Start by dividing the beam into equal segments. Each segment is represented by a lumped mass connected to its neighbors by springs. This transforms the continuous beam into a discrete system.

Deriving the Mass and Stiffness Matrices

The next step is to derive the mass and stiffness matrices for the system. The mass matrix represents the distribution of mass in the system, while the stiffness matrix represents the spring constants.

Example:

If the beam is divided into n segments, the mass matrix M and stiffness matrix K might look like:

M = diag([m1, m2, m3, ..., mn]);K = [k1 -k1 0 ... 0;-k1 k1+k2 -k2 ... 0;0 -k2 k2+k3 ... 0;...

Modal Analysis

Modal analysis is used to determine the natural frequencies and mode shapes of the system. This can be done by solving the eigenvalue problem for the system matrices.

Example:

[eigenvectors, eigenvalues] = eig(K, M);natural_frequencies = sqrt(diag(eigenvalues));

The eig function computes the eigenvalues and eigenvectors of the system, where the square root of the eigenvalues gives the natural frequencies.

Visualization

Visualizing the mode shapes helps understand how the beam will deform at each natural frequency. MATLAB’s plotting functions can be used for this purpose.

Example:

for i = 1:length(natural_frequencies)plot(eigenvectors(:,i));hold on;endxlabel('Segment');ylabel('Mode Shape');title('Mode Shapes of the Beam');legend('Mode 1', 'Mode 2', ..., 'Mode n');

This plot shows how each segment of the beam displaces at different natural frequencies.

Modelling Using Lagrange’s Equation

Lagrange’s equation is a powerful method for deriving the equations of motion for a system. It is especially useful for systems with multiple degrees of freedom, such as a vibrating beam.

Identifying Generalized Coordinates

The first step in using Lagrange’s equation is to identify the generalized coordinates. These are the variables that describe the configuration of the system. For a vibrating beam, the generalized coordinates might be the vertical displacements of the lumped masses.

Computing Kinetic and Potential Energy

Next, write down the expressions for the kinetic and potential energy of the system.

  • Kinetic Energy (T): The kinetic energy is the sum of the kinetic energies of all the masses.
  • Potential Energy (V): The potential energy is the sum of the elastic potential energies stored in the springs.

Example:

syms x1 x2 x3 ... xn dx1 dx2 dx3 ... dxn;T = 0.5*m1*dx1^2 + 0.5*m2*dx2^2 + ... + 0.5*mn*dxn^2;V = 0.5*k1*(x2-x1)^2 + 0.5*k2*(x3-x2)^2 + ... + 0.5*kn*(xn-xn-1)^2;

Deriving the Equations of Motion

Apply Lagrange’s equation, which states:

Lumped-Mass Models & Forced Vibration Explained in MATLAB (4)

Where L=T−VL = T - VL=T−V is the Lagrangian of the system.

Example:

L = T - V;eqns = diff(diff(L, dx1), t) - diff(L, x1) == 0;

This symbolic approach in MATLAB allows you to derive the equations of motion for the system.

Modal Analysis

Modal analysis is crucial for understanding how a system behaves at its natural frequencies. It involves finding the natural frequencies and mode shapes, which provide insight into the system's dynamic characteristics.

Eigenvalue Analysis

In MATLAB, modal analysis is typically done by solving the eigenvalue problem for the system’s mass and stiffness matrices.

Example:

[eigenvectors, eigenvalues] = eig(K, M);natural_frequencies = sqrt(diag(eigenvalues));mode_shapes = eigenvectors;

This code snippet finds the natural frequencies and corresponding mode shapes.

Visualization

Plotting the mode shapes helps visualize how the system deforms at each natural frequency. Each mode shape represents a different vibration pattern.

Example:

for i = 1:length(natural_frequencies)plot(mode_shapes(:,i));hold on;endxlabel('Lumped Mass Index');ylabel('Displacement');title('Mode Shapes');legend('Mode 1', 'Mode 2', ..., 'Mode n');

Non-Periodic Excitations and Impulse Response

Non-periodic excitations, such as impulses, require different analysis techniques. Unlike steady-state analysis, which focuses on long-term behavior, impulse response analysis examines the system's immediate reaction to a sudden force.

Impulse Response Function

The impulse response function describes how the system responds to an impulse input. In MATLAB, this can be computed using the impulse function from the Control System Toolbox.

Example:

sys = ss(A, B, C, D); % State-space representationimpulse(sys);xlabel('Time (s)');ylabel('Response');title('Impulse Response');

This function generates a plot showing the system's response over time.

Time-Domain Analysis

For non-periodic excitations, it’s often necessary to analyze the system’s response in the time domain. MATLAB’s plotting functions can be used to visualize the transient response of the system.

Example:

t = 0:0.01:10;F = impulse_input(t); % Define the impulse inputx = lsim(sys, F, t);plot(t, x);xlabel('Time (s)');ylabel('Displacement (m)');title('Time-Domain Response to Impulse');

This plot provides insight into how the system behaves immediately after the impulse.

Testing and Submission

Once your MATLAB code is complete, it’s essential to test it thoroughly. Testing ensures that your code works as expected and meets the requirements of the assignment.

Use MATLAB Grader for Submission

If your course uses MATLAB Grader for submissions, make sure your code passes all visible tests. Remember that there might be hidden tests that are not visible to you, so avoid hard-coding input values and write flexible code that can handle various test cases.

Documentation and Reporting

Even if a full formal report isn’t required, it’s good practice to document your code with comments. Clear documentation makes it easier for others (and yourself) to understand your code. Additionally, prepare brief answers to any specific questions that may be part of your assignment.

Example:

% This section calculates the natural frequencies of the system% Inputs: Mass matrix M, Stiffness matrix K% Outputs: Natural frequencies[eigenvectors, eigenvalues] = eig(K, M);natural_frequencies = sqrt(diag(eigenvalues));

Good documentation and clear code structure can make a significant difference in your grade and your understanding of the material.

General Tips for Success

Successfully completing a MATLAB assignment on vibration analysis requires a combination of theoretical knowledge, computational skills, and good coding practices. Here are some general tips to help you succeed:

Iterative Development

Write and test your code in small, manageable sections. This iterative approach allows you to catch errors early and understand each part of the code before moving on.

Use MATLAB’s Help Resources

MATLAB offers extensive help documentation and online resources. If you’re unsure how to use a particular function, such as ode45, eig, or impulse, refer to MATLAB’s documentation or seek online tutorials.

Plagiarism and Integrity

Always write your code independently. Even if you discuss solutions with peers, ensure that the work you submit is entirely your own. Academic integrity is crucial, and plagiarism can have serious consequences.

Conclusion

Tackling MATLAB assignments in vibration analysis can be challenging, but with the right approach, it’s entirely manageable. By breaking down the problem, using MATLAB’s powerful computational tools, and following good coding practices, you can successfully complete your assignments and deepen your understanding of vibration analysis. Remember, the key to success lies in understanding the physical principles, translating them into mathematical models, and using MATLAB to find solutions. Good luck!

Lumped-Mass Models & Forced Vibration Explained in MATLAB (2024)

FAQs

How to solve vibration problem in Matlab? ›

The first method is to use matrix algebra and the second one is to use the MATLAB command 'solve'. where A is known as the coefficient matrix, X is called the variable matrix and B, the constant matrix. The MATLAB code for the above-mentioned operations is as shown below.

What is the forced vibration of particles? ›

The entire system (string, guitar, and enclosed air) begins vibrating and forces surrounding air particles into vibrational motion. The tendency of one object to force another adjoining or interconnected object into vibrational motion is referred to as a forced vibration.

What is forced vibration in structural dynamics? ›

Forced vibration is the one in which external energy is added to the vibrating system. The amplitude of a forced-undamped vibration would increase over time until the mechanism was destroyed.

What is forced vibration with damping? ›

There are two types of vibrations; free vibrations and forced vibrations. Damped vibrations are a subset of forced vibrations where the force is applied to resist the motion of the system, while in free vibrations, there is no external force applied.

How do I fix my vibration problem? ›

In Settings go to Sound and Vibration, then select Vibration intensity and increase/decrease the options as per your requirement. Hope this helps. How do you turn off vibration completely on an Android?

How do you solve problems in MATLAB? ›

Y = solve( eqns , vars ) solves the system of equations eqns for the variables vars and returns a structure that contains the solutions. If you do not specify vars , solve uses symvar to find the variables to solve for. In this case, the number of variables that symvar finds is equal to the number of equations eqns .

What is the equation for forced vibration? ›

Forced Vibration Equation: The Forced Vibration Equation, particularly in the context of a damped harmonic oscillator, is expressed as: m ⋅ x ¨ + γ ⋅ x ˙ + k ⋅ x = F ⋅ cos ⁡ ( w ⋅ t ) .

What is a common example of a forced vibration? ›

The vibrations of a body which take place under the influence of an external periodic force acting on it, are called the forced vibrations. For example: when guitar is played, the artist forces the strings of the guitar to execute forced vibrations.

What is another name for forced vibration? ›

Forced (Resonant) Vibration

This speed becomes critical when the frequency of excitation is equal to one of the natural frequencies of the system.

What are the two characteristics of forced vibration? ›

The body acquires the frequency of external periodic force. 2. The amplitude of forced vibration is very small if the frequency of external force is much different from natural frequency of the body. 3.

What is the formula for calculating vibration? ›

The Free Vibration Equation in vibro-dynamics is m d 2 x d t 2 + c d x d t + k x = 0 . Here, m denotes displacement, c corresponds to acceleration, k signifies velocity, x is the mass, d 2 x d t 2 is the damping coefficient, and d x d t is the stiffness coefficient.

What are the advantages of forced vibration? ›

Detection of defects: Forced vibrations can detect defects in mechanical systems and structures, such as cracks or looseness in bolts, by analyzing the system's response to the excitation. 4. Control of vibrations: Forced vibrations can control unwanted vibrations in a system.

What are the four types of vibration? ›

A vibrating motion can be oscillating, reciprocating, or periodic. Vibration can also be either harmonic or random. Harmonic vibration occurs when a vibration's frequency and magnitude are constant. A vibration is random when the frequency and magnitude vary with time.

What are the applications of forced vibration? ›

Some examples include: Structural dynamics: Engineers use forced vibration analysis to study the response of structures such as bridges, buildings, and towers to wind and earthquake forces. This helps ensure that the structures can withstand these forces without damaging or collapsing.

What are the three types of vibration? ›

There are three different types of vibration.
  • Free or Natural Vibration.
  • Forced Vibration.
  • Damped Vibration.

How can vibration be reduced? ›

Vibration reduction can be achieved in many different ways, depending on the problem; the most common are stiffening, damping and isolation.

How do I clean up noisy data in MATLAB? ›

Gaussian Filter

Smooth a vector of noisy data with a Gaussian-weighted moving average filter. Display the window size used by the filter. Smooth the original data with a larger window containing 20 elements. Plot the smoothed data for both window sizes.

How do you fix resonance vibration? ›

Once the resonance is confirmed, either change the mass or the stiffness of the equipment to change its natural frequency. If it cannot be accomplished try to change the operating speed of the equipment. If that fails, consider installing a dynamic absorber to counteract the initial exciting force.

Top Articles
Miami, Wynwood, FL, US | Studio apartment for rent #129869247 | Rentberry
Should I Visit Fort-de-France or Pensacola for Vacation? Which is Better? Which is Cheaper? Which is More Expensive? | Budget Your Trip
Cpmc Mission Bernal Campus & Orthopedic Institute Photos
Craigslist Myrtle Beach Motorcycles For Sale By Owner
St Thomas Usvi Craigslist
Enrique Espinosa Melendez Obituary
Robot or human?
Craigslist Nj North Cars By Owner
Unraveling The Mystery: Does Breckie Hill Have A Boyfriend?
Ohiohealth Esource Employee Login
World Cup Soccer Wiki
Inevitable Claymore Wow
Red Tomatoes Farmers Market Menu
Guidewheel lands $9M Series A-1 for SaaS that boosts manufacturing and trims carbon emissions | TechCrunch
Minecraft Jar Google Drive
Finger Lakes Ny Craigslist
Mbta Commuter Rail Lowell Line Schedule
Mail.zsthost Change Password
Grab this ice cream maker while it's discounted in Walmart's sale | Digital Trends
Aberration Surface Entrances
Images of CGC-graded Comic Books Now Available Using the CGC Certification Verification Tool
Mzinchaleft
Aldi Süd Prospekt ᐅ Aktuelle Angebote online blättern
Red Devil 9664D Snowblower Manual
V-Pay: Sicherheit, Kosten und Alternativen - BankingGeek
10 Fun Things to Do in Elk Grove, CA | Explore Elk Grove
Euro Style Scrub Caps
Danielle Ranslow Obituary
Rgb Bird Flop
Astro Seek Asteroid Chart
950 Sqft 2 BHK Villa for sale in Devi Redhills Sirinium | Red Hills, Chennai | Property ID - 15334774
Allegheny Clinic Primary Care North
25Cc To Tbsp
Redbox Walmart Near Me
Que Si Que Si Que No Que No Lyrics
Http://N14.Ultipro.com
Gabrielle Enright Weight Loss
About Us | SEIL
Empire Visionworks The Crossings Clifton Park Photos
Streameast.xy2
Wattengel Funeral Home Meadow Drive
Section 212 at MetLife Stadium
Sabrina Scharf Net Worth
Tsbarbiespanishxxl
Letter of Credit: What It Is, Examples, and How One Is Used
Man Stuff Idaho
Anderson Tribute Center Hood River
Terrell Buckley Net Worth
15:30 Est
Where and How to Watch Sound of Freedom | Angel Studios
Appsanywhere Mst
Coldestuknow
Latest Posts
Article information

Author: Madonna Wisozk

Last Updated:

Views: 5801

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Madonna Wisozk

Birthday: 2001-02-23

Address: 656 Gerhold Summit, Sidneyberg, FL 78179-2512

Phone: +6742282696652

Job: Customer Banking Liaison

Hobby: Flower arranging, Yo-yoing, Tai chi, Rowing, Macrame, Urban exploration, Knife making

Introduction: My name is Madonna Wisozk, I am a attractive, healthy, thoughtful, faithful, open, vivacious, zany person who loves writing and wants to share my knowledge and understanding with you.