Kimbugwe Daniel asked . 2023-07-12

How can i obtain a damping Matrix C, with an inherent damping matrix of 2% for all the modes ?

 have written code to obtain eigen values and vectors using Stiffness K and Mass M and i want to obtain the damping matrix using an inherent damping ratio of 2% of the structure for all the vibration modes. How do i do it? here under is the my code thus far.

 

clc;
h=[5.5]+[0:3.96:20*3.95];   % Total floor height(m)%
%--------------Start of Mass Matrix---------------%
M(1,1)=1.126e+003 ;      % unit: ton
M(20,20)=1.170e+003  ;   % unit: ton
for i=2:19
    M(i,i)=1.100e+003;   % unit: ton
end
disp('Mass Matrix(ton):'); disp(M)
%--------------end of Mass Matrix-----------------%
%--------------Start of Stiffness Matrix----------%
for i=1:5
k(1,i)=862.07e+003;        % unit: kN/m
end
for i=6:11
k(1,i)=554.17e+003   ;     % unit: kN/m
end
for i=12:14
k(1,i)=453.51e+003 ;       % unit: kN/m
end
for i=15:17
k(1,i)=291.23e+003 ;      % unit: kN/m
end
for i=18:19
k(1,i)=256.46e+003    ;   % unit: kN/m
end
k(1,20)=171.70e+003   ;       % unit: kN/m
K=zeros(20,20)
for j=1:(20-1)
    K(j,j)   =   k(1,j)+k(1,j+1);
    K(j,j+1) =  -k(1,j+1);
    K(j+1,j) =  -k(1,j+1);
end
K(20,20)=171.70e+003 ;         % unit: kN/m
%--------------End of Stiffness Matrix--------------%
%----Start of Eigen Values and Eigne Vectors--------%
[eigvec,eigval]=eig(K,M); %Eigen Values and Vectors%
wn = sort(sqrt(diag(eigval)));
f  =(wn/(2*pi));
Tn = (2*pi)./wn;
disp('Mode  Omega(w)  Time_Period ')
for i = 1:length(wn)
    fprintf (' %d        %.2f         %.2f \n',i,wn(i,1),Tn(i,1))
end
%-------End of Eigen values and Eigne Vectors-------%
%-----Start of Normalisation of mode shapes---------%
for j = 1 : length(wn)
    eigvec(:,j)=eigvec(:,j)/eigvec(length(wn),j);
end
disp('Mode shapes:'); disp(eigvec)
%-----------End of Normalisation of mode shapes-----------%

 

damping matrix c , Programming , MATLAB

Expert Answer

Prashant Kumar answered . 2024-12-22 03:05:51

To obtain the damping matrix using an inherent damping ratio of 2% for all vibration modes, you can modify your existing code by following these steps:
  1. Calculate the damping coefficient (c) using the formula: c = 2 * damping_ratio * sqrt(mass * stiffness), where damping_ratio is the desired inherent damping ratio (2% in this case), mass is the mass matrix, and stiffness is the stiffness matrix.
  2. Multiply the damping coefficient by the mass matrix to obtain the damping matrix (C).
Here's the modified code to incorporate these changes:
 
 
clc;
h = [5.5] + [0:3.96:20*3.95];   % Total floor height(m)
% Start of Mass Matrix
M(1,1) = 1.126e+003;      % unit: ton
M(20,20) = 1.170e+003;   % unit: ton
for i = 2:19
    M(i,i) = 1.100e+003;   % unit: ton
end
disp('Mass Matrix(ton):');
Mass Matrix(ton):
disp(M);
Columns 1 through 16

        1126           0           0           0           0           0           0           0           0           0           0           0           0           0           0           0
           0        1100           0           0           0           0           0           0           0           0           0           0           0           0           0           0
           0           0        1100           0           0           0           0           0           0           0           0           0           0           0           0           0
           0           0           0        1100           0           0           0           0           0           0           0           0           0           0           0           0
           0           0           0           0        1100           0           0           0           0           0           0           0           0           0           0           0
           0           0           0           0           0        1100           0           0           0           0           0           0           0           0           0           0
           0           0           0           0           0           0        1100           0           0           0           0           0           0           0           0           0
           0           0           0           0           0           0           0        1100           0           0           0           0           0           0           0           0
           0           0           0           0           0           0           0           0        1100           0           0           0           0           0           0           0
           0           0           0           0           0           0           0           0           0        1100           0           0           0           0           0           0
           0           0           0           0           0           0           0           0           0           0        1100           0           0           0           0           0
           0           0           0           0           0           0           0           0           0           0           0        1100           0           0           0           0
           0           0           0           0           0           0           0           0           0           0           0           0        1100           0           0           0
           0           0           0           0           0           0           0           0           0           0           0           0           0        1100           0           0
           0           0           0           0           0           0           0           0           0           0           0           0           0           0        1100           0
           0           0           0           0           0           0           0           0           0           0           0           0           0           0           0        1100
           0           0           0           0           0           0           0           0           0           0           0           0           0           0           0           0
           0           0           0           0           0           0           0           0           0           0           0           0           0           0           0           0
           0           0           0           0           0           0           0           0           0           0           0           0           0           0           0           0
           0           0           0           0           0           0           0           0           0           0           0           0           0           0           0           0

  Columns 17 through 20

           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
           0           0           0           0
        1100           0           0           0
           0        1100           0           0
           0           0        1100           0
           0           0           0        1170
%--------------Start of Stiffness Matrix----------%
for i=1:5
k(1,i)=862.07e+003;        % unit: kN/m
end
for i=6:11
k(1,i)=554.17e+003   ;     % unit: kN/m
end
for i=12:14
k(1,i)=453.51e+003 ;       % unit: kN/m
end
for i=15:17
k(1,i)=291.23e+003 ;      % unit: kN/m
end
for i=18:19
k(1,i)=256.46e+003    ;   % unit: kN/m
end
k(1,20)=171.70e+003   ;       % unit: kN/m
K=zeros(20,20)
K = 20×20
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0
for j=1:(20-1)
    K(j,j)   =   k(1,j)+k(1,j+1);
    K(j,j+1) =  -k(1,j+1);
    K(j+1,j) =  -k(1,j+1);
end
K(20,20)=171.70e+003 ;         % unit: kN/m
% Calculate the damping coefficient (c)
damping_ratio = 0.02;  % 2% inherent damping ratio
mass = M;
stiffness = K;
c = 2 * damping_ratio * sqrt(mass * stiffness);
% Multiply the damping coefficient by the mass matrix to obtain the damping matrix (C)
C = c .* M;
% Start of Eigen Values and Eigen Vectors
[eigvec, eigval] = eig(K, M); % Eigen Values and Vectors
wn = sort(sqrt(diag(eigval)));
f = wn / (2*pi);
Tn = (2*pi) ./ wn;
disp('Mode  Omega(w)  Time_Period ')
Mode  Omega(w)  Time_Period 
for i = 1:length(wn)
    fprintf(' %d        %.2f         %.2f \n', i, wn(i,1), Tn(i,1))
end
 1        1.79         3.51 
 2        4.65         1.35 
 3        7.73         0.81 
 4        10.45         0.60 
 5        13.16         0.48 
 6        16.07         0.39 
 7        18.51         0.34 
 8        21.48         0.29 
 9        23.70         0.27 
 10        26.15         0.24 
 11        27.84         0.23 
 12        30.07         0.21 
 13        31.42         0.20 
 14        34.49         0.18 
 15        37.31         0.17 
 16        39.31         0.16 
 17        41.60         0.15 
 18        43.90         0.14 
 19        48.23         0.13 
 20        53.93         0.12 
% Start of Normalisation of mode shapes
for j = 1:length(wn)
    eigvec(:,j) = eigvec(:,j) / eigvec(length(wn),j);
end
disp('Mode shapes:');
Mode shapes:
disp(eigvec);
 1.0e+11 *

  Columns 1 through 19

    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0157
    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000   -0.0163
    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0001
    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0162
    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000   -0.0157
    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0073
    0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0034
    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0016
    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0007
    0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000    0.0003
    0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0001
    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000    0.0000    0.0000
    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000
    0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000
    0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000
    0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000
    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000
    0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000
    0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000
    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000

  Column 20

   -3.9705
    7.1448
   -8.2594
    6.9930
   -3.7107
    1.0641
   -0.3051
    0.0875
   -0.0251
    0.0071
   -0.0019
    0.0004
   -0.0001
    0.0000
   -0.0000
    0.0000
   -0.0000
    0.0000
   -0.0000
    0.0000

By adding the calculation of the damping coefficient and multiplying it with the mass matrix, you will obtain the desired damping matrix (C) using the inherent damping ratio of 2% for all vibration modes.


Not satisfied with the answer ?? ASK NOW

Frequently Asked Questions

MATLAB offers tools for real-time AI applications, including Simulink for modeling and simulation. It can be used for developing algorithms and control systems for autonomous vehicles, robots, and other real-time AI systems.

MATLAB Online™ provides access to MATLAB® from your web browser. With MATLAB Online, your files are stored on MATLAB Drive™ and are available wherever you go. MATLAB Drive Connector synchronizes your files between your computers and MATLAB Online, providing offline access and eliminating the need to manually upload or download files. You can also run your files from the convenience of your smartphone or tablet by connecting to MathWorks® Cloud through the MATLAB Mobile™ app.

Yes, MATLAB provides tools and frameworks for deep learning, including the Deep Learning Toolbox. You can use MATLAB for tasks like building and training neural networks, image classification, and natural language processing.

MATLAB and Python are both popular choices for AI development. MATLAB is known for its ease of use in mathematical computations and its extensive toolbox for AI and machine learning. Python, on the other hand, has a vast ecosystem of libraries like TensorFlow and PyTorch. The choice depends on your preferences and project requirements.

You can find support, discussion forums, and a community of MATLAB users on the MATLAB website, Matlansolutions forums, and other AI-related online communities. Remember that MATLAB's capabilities in AI and machine learning continue to evolve, so staying updated with the latest features and resources is essential for effective AI development using MATLAB.

Without any hesitation the answer to this question is NO. The service we offer is 100% legal, legitimate and won't make you a cheater. Read and discover exactly what an essay writing service is and how when used correctly, is a valuable teaching aid and no more akin to cheating than a tutor's 'model essay' or the many published essay guides available from your local book shop. You should use the work as a reference and should not hand over the exact copy of it.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.