500 likes | 593 Views
This Week’s Objectives. Establish Dynamic Models of System to be Controlled Second Order Systems Obtain Solutions using LaPlace Transforms Create Simulink Model and Generate Simulated Results. Modeling of a Spring-Mass-Damper System. (Modeling of a Second Order System).
E N D
This Week’s Objectives • Establish Dynamic Models of System to be Controlled • Second Order Systems • Obtain Solutions using LaPlace Transforms • Create Simulink Model and Generate Simulated Results
Modeling of a Spring-Mass-Damper System (Modeling of a Second Order System)
let’s start with a one car system • suppose we know: • m1 mass of the car • k1, L01 spring constant and free length • c damping coefficient f(t) c m1 k1,L01 x1
one car system • suppose at start (initial condition): • x1 = L01 spring is applying zero force • = 0 car is at rest • f(0) = 0 there is no applied force f(t) c m1 k1,L01 x1
one car system • now we want (final condition): • x1 = L01 + 3 cm • we want to move there ‘as fast as possible’ • we don’t want to overshoot ‘much’ • we want the system to settle down ‘quick’ f(t) We’re going to need to properly define these terms. c m1 k1,L01 x1
one car system • we have a desired final position • we can measure the position of the car • we can set the value of f, the applied force, to any value we want and constantly adjust it We’ll pick a value for f that is related to the difference between the current measured position and the desired final position. f(t) c m1 k1,L01 x1
In Controls Terminology: BLOCK DIAGRAM f(t) c m1 k1,L01 x1
f(t) c m1 k1,L01 x1 • problem statement • given: • m1 mass of the car • k1, L01 spring constant and free length • c damping coefficient • x1(0) initial position at t=0 • (0) initial velocity at t=0 • xd desired position • generate values for the input force such that • the car reaches the desired position within 3 sec • the car will not overshoot by more than 0.25 cm • the car will settle within 0.1 cm within 5 sec
f(t) c m1 k1,L01 x1 f(t) m1 c k1 (x1- L01) • how to start? • let’s first write the equationof motion • assume the current position x1>L01 and that 1 is positive
f(t) c m1 k1,L01 x1 • how do you solve for x1(t) if you know f(t) as well as x1(0) and 1(0)?
f(t) c m1 k1,L01 x1 • we must solve a secondorder differential equation • we will write the equation in the Laplace domain • Laplace transformations substitute easily solved algebraic equations for differential equations
Review of Laplace transforms • if f(t) is some function of time, then the Laplace transformation of f(t) can be written as • change from the time domain to the 's' domain
Example: Let f(t) = 1 for t > 0. Find F(s).
Example: Let f(t) = eat for t > 0 where ‘a’ is a constant. Find F(s).
The LaPlace transform is a linear operation. • For any functions f(t) and g(t) and for any constants, a and b, L{a f(t) + b g(t)} = a L {f(t)} + b L {g(t)}
Example: Let f(t) = cosh(at) = (eat + e-at)/2for t > 0. Find F(s).
LaPlace transform of the derivative of f(t). L(f'(t)) = sL (f) - f(0) L (f"(t)) = s2L (f) - sf(0) - f'(0) L (f (n)) = snL (f) - sn-1f(0) - sn-2f'(0) - ... - f(n-1)(0)
Laplace transforms have been calculated for a large variety of functions. Sampling of these are listed in Table 2.3 of the text • Modern Control Systems, 9th ed., R.C. Dorf and R.H. Bishop, Prentice Hall, 2001.
Inverse transformations are often of the form where G(s) and H(s) are polynomials in s • This ratio must be re-written in terms of its partial fraction expansion. • Review the techniques for partial fraction expansion when the polynomial H(s) has repeated roots or complex roots.
Example: Let a≠b . Find f(t) first perform partial fraction reduction Multiplying the left and right side of the above equation by (s-a)(s-b) gives
1= A1 (s-b) + A2 (s-a) Can pick two values for s and then solve for A1 and A2 from the two equations in two unknowns. When s=a, 1= A1(a-b). When s=b, 1=A2(b-a). Thus
substituting A1 and A2 into F(s) gives • Using the linearity of the Laplace transform,
from previous example END OF REVIEW
Back to our problem. car 3 car 2 car 1
f(t) c m1 k1,L01 x1 • equation of motion • take Laplace transform of left and right side of equation
f(t) c m1 k1,L01 x1
f(t) c m1 k1,L01 x1
f(t) c m1 k1,L01 x1 • supposem1 = 2 kg = 2 N sec2/m k1 = 3 N/cm = 300 N/m L01 = 6 cm = 0.06 m c = 2.5 N sec/cm = 250 N sec/m x1(0) = 4 cm = 0.04 m (0) = -2 cm/sec = -0.02 m/sec f(t) is a step input of 8 N starting at t=0
f(t) c m1 k1,L01 x1 seems like s has units of 1/sec and X(s) has units of m sec are units consistent?
x1(t) = 0.08667+ 0.00667 e-62.5 t [-7cosh(61.29 t) – 7.187sinh(61.29 t)] how do we check the results ? check boundary conditions check steady state final position - final value theorem:
f(t) c m1 k1,L01 x1 How to model the system in Simulink?
f(t) c m1 k1,L01 x1 • supposem1 = 2 kg = 2 N sec2/m k1 = 3 N/cm = 300 N/m L01 = 6 cm = 0.06 m c = 2.5 N sec/cm = 250 N sec/m x1(0) = 4 cm = 0.04 m (0) = -2 cm/sec = -0.02 m/sec f(t) is a step input of 8 N starting at t=0
f(t) c m1 k1,L01 x1 • let’s model this systemusing Simulink • governing differential equation • for our case, f(t) = 0, (0) = -0.02 m/sec, x1(0) = 0.04 m • thus
f(t) c m1 k1,L01 x1
f1 f2 c2 c1 m1 m2 k1, L01 k2, L02 k3, L03 x1 d1 d2 x2 d3 d1 = d2 = 15 cm d3 = 80 cm m1 = 2.5 kg m2 = 5.5 kg c1 = 8 N sec/m c2 = 10 N sec/m k1 = 3 N/cm ; L01 = 6 cm k2 = 5 N/cm ; L02 = 8 cm k3 = 4 N/cm ; L03 = 10 cm Cars 1 and 2 start at rest at their static equilibrium position. A constant force f1 = 20N and f2 = -5 N . Obtain the motion response of the two cars, i.e. obtain x1(t) and x2(t).
m1 k1, L01 k2, L02 x1 d1 x2 m2 k2, L02 k3, L03 x1 d1 d2 x2 d3 Determine the position of the two cars at static equilibrium when no forces are applied. Car 1 will be in equilibrium when k1 (x1 – L01) = k2 [x2 – (x1 + d1 + L02)] Car 2 will be in equilibrium when k2 [x2 – (x1 + d1 + L02)] = k3 [d3 – (x2 + d2 + L03)] Substituting the given parameters and solving for x1 and x2 gives x1_equil = 17.06 cm x2_equil = 46.70 cm
f1 m1 k2 [x2 – (x1 + d1 + L02)] k1 (x1 – L01) x1 f2 m2 k2 [x2 – (x1 + d1 + L02)] k3 [d3 – (x2 + d2 + L03)] x1 d1 d2 x2 d3 Now write equations of motion of the system.
car 2 position, meters car 1 time, sec
This Week’s Objectives • Establish Dynamic Models of System to be Controlled • Second Order Systems • Obtain Solutions using LaPlace Transforms • Create Simulink Model and Generate Simulated Results