net Chapter 2 Dynamic Models Problems and Solutions for Section 2. Write the differential equations for the mechanical systems shown in Fig. Solution: The key is to draw the Free Body Diagram (FBD) in order to keep the signs right. For (a), to identify the direction of the spring forces on the object, let x2 = 0 and Þxed and increase x1 from 0. Then the k1 spring will be stretched producing its spring force to the left and the k2 spring will be compressed producing its spring force to the left also. You can use the same technique on the damper forces and the other mass. DYNAMIC MODELS Figure 2.38: Mechanical systems www. Write the equations of motion of a pendulum consisting of a thin, 2-kg stick of length l suspended from a pivot. How long should the rod be in order for the period to be exactly 2 secs? (The inertia I of a thin stick about an endpoint is 13 ml2 . Assume θ is small enough that sin θ ∼ = θ.) Solution: Let’s use Eq. DYNAMIC MODELS O l 2 G mg Moment about point O. l MO = −mg × sin θ = IO θ̈ 2 1 2 = ml θ̈ 3 3g θ̈ + sin θ = 0 2l As we assumed θ is small, 3g θ̈ + θ=0 2l The frequency only depends on the length of the rod 3g ω2 = 2l s 2π 2l T = = 2π =2 ω 3g 3g l = = 1.39: Double pendulum q 2l (a) Compare the formula for the period, T = 2π 3g with the well known formula for the period q of a point mass hanging with a string with length l. (b) Important! In general, Eq.14) is valid only when the reference point for the moment and the moment of inertia is the mass center of the body. However, we also can use the formular with a reference point other than mass center when the point of reference is Þxed or not accelerating, as was the case here for point O. Write the equations of motion for the double-pendulum system shown in Fig. Assume the displacement angles of the pendulums are small enough to ensure that the spring is always horizontal. The pendulum rods are taken to be massless, of length l, and the springs are attached 3/4 of the way down. DYNAMIC MODELS 3 l G1 G2 4 k m m 3 3 l sin G1 l sin G 2 4 4 If we write the moment equilibrium about the pivot point of the left pen- dulem from the free body diagram, 3 3 M = −mgl sin θ1 − k l (sin θ1 − sin θ2 ) cos θ1 l = ml2 θ̈1 4 4 9 2 ml2 θ̈1 + mgl sin θ1 + kl cos θ1 (sin θ1 − sin θ2 ) = 0 16 Similary we can write the equation of motion for the right pendulem 3 3 −mgl sin θ2 + k l (sin θ1 − sin θ2 ) cos θ2 l = ml2 θ̈2 4 4 As we assumed the angles are small, we can approximate using sin θ1 ≈ θ1 , sin θ2 ≈ θ2 , cos θ1 ≈ 1, and cos θ2 ≈ 1. Finally the linearized equations of motion becomes, 9 mlθ̈1 + mgθ1 + kl (θ1 − θ2 ) = 0 16 9 mlθ̈2 + mgθ2 + kl (θ2 − θ1 ) = 0 16 Or www. Write the equations of motion for a body of mass M suspended from a Þxed point by a spring with a constant k. Carefully deÞne where the body’s displacement is zero. Solution: Some care needs to be taken when the spring is suspended vertically in the presence of the gravity. We deÞne x = 0 to be when the spring is unstretched with no mass attached as in (a). The static situation in (b) results from a balance between the gravity force and the spring. From the free body diagram in (b), the dynamic equation results mẍ = −kx − mg. We can manipulate the equation ³ m ´ mẍ = −k x + g , k so if we replace x using y = x + m k g, mÿ = −ky mÿ + ky = 0 www. DYNAMIC MODELS The equilibrium value of x including the effect of gravity is at x = − m kg and y represents the motion of the mass about that equilibrium point. An alternate solution method, which is applicable for any problem involving vertical spring motion, is to deÞne the motion to be with respect to the static equilibrium point of the springs including the effect of gravity, and then to proceed as if no gravity was present. In this problem, we would deÞne y to be the motion with respect to the equilibrium point, then the FBD in (c) would result directly in mÿ = −ky. For the car suspension discussed in Example 2.2, (a) write the equations of motion (Eqs.11)) in state-variable form. Use the state vector x = [ x xú y yú ]T . (b) Plot the position of the car and the wheel after the car hits a “unit bump” (i., r is a unit step) using MATLAB. Assume that m1 = 10 kg, m2 = 350 kg, kw = 500, 000 N/m, ks = 10, 000 N/m. Find the value of b that you would prefer if you were a passenger in the car. Solution: (a) We can arrange the equations of motion to be used in the state- variable form ks b ks b kw kw ẍ = − x− xú + y+ yú − x+ r m1 m1 m1 m1 m1 m1 µ ¶ ks kw b ks b kw = − + x− xú + y+ yú + r m1 m1 m1 m1 m1 m1 ks b ks b ÿ = x+ xú − y− yú m2 m2 m2 m2 So, for the given sate vector of x = [ x xú y yú ]T , the state-space form will be, xú ³ 0 ´ 1 0 0 x 0 ẍ − ks + kw − b ks b xú w k = m1 m1 m1 m1 m1 + m1 r yú 0 0 0 1 y 0 ÿ ks b ks −m − mb2 yú 0 m2 m2 2 (b) Note that b is not the damping ratio, but damping. We need to Þnd the proper order of magnitude for b, which can be done by trial and www. What passengers feel is the position of the car. Some general requirements for the smooth ride will be, slow response with small overshoot and oscillation.5 W heel W heel Car Car 1 1 0.5 W heel W heel Car Car 1 1 0.5 2 From the Þgures, b ≈ 3000 would be acceptable. There is too much overshoot for lower values, and the system gets too fast (and harsh) for larger values. DYNAMIC MODELS % Problem 2.5 b clear all, close all m1 = 10; m2 = 350; kw = 500000; ks = 10000; B = [ 1000 2000 3000 4000 ]; t = 0:0.01:2; for i = 1:4 b = B(i); F = [ 0 1 0 0; -( ks/m1 + kw/m1 ) -b/m1 ks/m1 b/m1; 0 0 0 1; ks/m2 b/m2 -ks/m2 -b/m2 ]; G = [ 0; kw/m1; 0; 0 ]; H = [ 1 0 0 0; 0 0 1 0 ]; J = 0; y = step( F, G, H, J, 1, t ); subplot(2,2,i); plot( t, y(:,1), ’:’, t, y(:,2), ’-’ ); legend(’Wheel’,’Car’); ttl = sprintf(’Response with b = %4. Automobile manufacturers are contemplating building active suspension systems. The simplest change is to make shock absorbers with a change- able damping, b(u1 ). It is also possible to make a device to be placed in parallel with the springs that has the ability to supply an equal force, u2, in opposite directions on the wheel axle and the car body. (a) Modify the equations of motion in Example 2.2 to include such con- trol inputs. (b) Is the resulting system linear? (c) Is it possible to use the forcer, u2, to completely replace the springs and shock absorber? Is this a good idea? Solution: (a) The FBD shows the addition of the variable force, u2 , and shows b as in the FBD of Fig.5, however, here b is a function of the control variable, u1 . The forces below are drawn in the direction that would result from a positive displacement of x.net 21 m1 ẍ = b (u1 ) (yú − x) ú + ks (y − x) − kw (x − r) − u2 m2 ÿ = −ks (y − x) − b (u1 ) (yú − x) ú + u2 (b) The system is linear with respect to u2 because it is additive. But b is not constant so the system is non-linear with respect to u1 be- cause the control essentially multiplies a state element. So if we add controllable damping, the system becomes non-linear. (c) It is technically possible. However, it would take very high forces and thus a lot of power and is therefore not done. It is a much bet- ter solution to modulate the damping coefficient by changing oriÞce sizes in the shock absorber and/or by changing the spring forces by increasing or decreasing the pressure in air springs. These features are now available on some cars. where the driver chooses between a soft or stiff ride. Modify the equation of motion for the cruise control in Example 2.4), so that it has a control law; that is, let u = K(vr − v) (124) where vr = reference speed (125) K = constant. (126) This is a ‘proportional’ control law where the difference between vr and the actual speed is used as a signal to speed the engine up or slow it down. Put the equations in the standard state-variable form with vr as the input and v as the state. Assume that m = 1000 kg and b = 50 N · s / m, and Þnd the response for a unit step in vr using MATLAB. Using trial and error, Þnd a value of K that you think would result in a control system in which the actual speed converges as quickly as possible to the reference speed with no objectional behavior. DYNAMIC MODELS b 1 vú + v= u m m substitute in u = K (vr − v) b 1 K vú + v= u= (vr − v) m m m A block diagram of the scheme is shown below where the car dynamics are depicted by its transfer function from Eq. vr 1 + 5 K u m v - s+ b m The state-variable form of the equations is, µ ¶ b K K vú = − + v+ vr m m m y = v so that the matrices for Matlab are µ ¶ b K F = − + m m K G = m H = 1 J = 0 For K = 100, 500, 1000, 5000 We have, www.net 23 Step Res pons e From: U(1) 1 0.) We can see that the larger the K is, the better the performance, with no objectionable behaviour for any of the cases. The fact that increasing K also results in the need for higher acceleration is less obvious from the plot but it will limit how fast K can be in the real situation because the engine has only so much poop. Note also that the error with this scheme gets quite large with the lower values of K.