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-----------%
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.
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.