Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a Vibrations questions about the motion of a door, where to solve the questions Matlab must be used How would you correct the

This is a Vibrations questions about the motion of a door, where to solve the questions Matlab must be used

How would you correct the syntax of the code given at the end to find part B especially?

Problem Statement The double acting door is able to swing in both direction to accommodate a high traffic entrance in the building. Besides the shape and material, the design of the door motion is about the double-hinge mechanism which provides the main stiffness and damping forces acting on the door. Assuming SDOF, the door motion is characterized by the angle of rotation q (see figure below). By the Newtons law, the equation of motion of q is given by

+ + = 0

where J [kg.m2] is the moment of inertia of the door about the rotating axis L, and c [N.m.s] and k [N.m/rad] are, respectively, the damping coefficient and stiffness constant of the double-hinge device. In the initial design, a double-hinge is selected with c = 10, k = 30. Assume J = 20. Simulate the system to answer the following questions.

  1. [15%] It is necessary that the door angle q can reach 65-deg (1.1345 rad) with a reasonable push. Assuming impulse-momentum principle, the push implies initial conditions 0 = 0 [rad], 0 = [rad/s]. Find the smallest to reach the 65-degree opening with the chosen double-hinge by simulation. Show numerically simulated q (t), and comment on the deficiency of the design.
  2. [85%] To redesign the door, it is determined that (b1) b bmax = 3.5 [rad/s], so the door can be opened by a reasonable push, and (b2), with 0 = 0 rad , 0 = 3.5, |q (t)| 3-deg for t > 4, so the door can be closed reasonably fast. With the same J value, find the region in plane, for c in [10,40] and k in [20,70], that conditions (b1) and (b2) are met.

For (b), 3 steps are needed to logically complete the task. (i) You would first need to discretize c and k in the range [10, 40] and [20,70], respectively. This means to divide the range of c into Nc points, and that of k into Nk points. It can be done by the linspace command; e.g.,

c = linspace(10,40,Nc);

creates an array of Nc points where c(1)=10 c(Nc)=40. (ii) You are then to repeat the simulation 6 7 times, one for each pair of c, k created in (i). Finally, (iii) for each simulation finished in (ii), the

conditions (b1), (b2) are checked based on the numerical data. When the conditions are met, record the corresponding (c, k). The rough code to accomplish this part is provided on the next page.

You should report (at least) 3 figures: two for , for (a), showing the door opens to 1.1345 rad (65-deg) and one for showing the (c, k) value satisfying the conditions with the cs being plotted as the x and ks as the y in a 2-D plot. You must explain how the results are obtained and verify the accuracy of your results. Clarity is paramount to earning the credit of your effort. For example, a report consisting of a set of figures without any explanation of what they are and how they are produced will receive no credit even the result may be correct.

THE CODE TEACHER GAVE WITH SYNTAX ERRORS:

>> Nc=100;

>> Nk=120;

>> c = linspace(10,40,Nc); ...

function [t,th,pass] = lab1(c0,k0)

J=20; opt=[]; F0=0; omega=0;

dt=0.01; % sampling time interval npt=2000; % number of sampling points

tspan=(1:npt)*dt; % time instants where x(t) is simulated

idx=0;

th_lim1=65/180*pi;

th_lim2=3/180*pi;

b_max=3.5;

for i=1:length(c0)

for j=1:length(k0)

%disp(num2str([i j idx]));

ctmp=0;

ktmp=0;

c=c0(i);

k=k0(j);

th0=[0;b_max];

[t,th]=ode45(@sdof,tspan,th0,opt,J,c,k,F0,omega);

% (b1) check beta

if % enter statement for th_max<65-deg check

ctmp = c;

end

% (b2) check th(t) decay

I= % enter statement for finding the last time index I where th(I)>3-deg

t_lim=t(I);

if t_lim < 4

ktmp=k;

end

if ctmp*ktmp ~= 0

idx=idx+1;

pass(idx,:)=[ctmp ktmp];

end

end

end

function G = sdof(t,x,J,c,k,F0,omega)

G = [x(2); (-c*x(2)-k*x(1) + F0*cos(omega*t))/J];

This is a Vibrations questions about the motion of a door, where to solve the questions Matlab must be used

How would you correct the syntax of the code given at the end to find part B especially?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions