feedback control system, Lecture notes of Control Systems

solutions for feedback control system

Typology: Lecture notes

2018/2019

Uploaded on 06/15/2019

hsj
hsj 🇰🇷

1 document

1 / 672

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter 2
Dynamic Models
Problems and Solutions for Section 2.1
1. Write the dierential equations for the mechanical systems shown in Fig. 2.38.
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=0andÞxed and increase x1from 0. Then the k1spring
will be stretched producing its spring force to the left and the k2spring
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.
(a)
m1¨x1=k1x1b1úx1k2(x1x2)
m2¨x2=k2(x2x1)k3(x2y)b2úx2
11
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download feedback control system and more Lecture notes Control Systems in PDF only on Docsity!

Chapter 2

Dynamic Models

Problems and Solutions for Section 2.

  1. Write the differential equations for the mechanical systems shown in Fig. 2.38.

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 x 2 = 0 and fixed and increase x 1 from 0. Then the k 1 spring will be stretched producing its spring force to the left and the k 2 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.

(a)

m 1 x® 1 = −k 1 x 1 − b 1 x˙ 1 − k 2 (x 1 − x 2 ) m 2 x® 2 = −k 2 (x 2 − x 1 ) − k 3 (x 2 − y) − b 2 x˙ 2

12 CHAPTER 2. DYNAMIC MODELS

Figure 2.38: Mechanical systems

14 CHAPTER 2. DYNAMIC MODELS

mg

q

O^ l

Moment about point O.

MO = −mg ◊

l 2

sin θ = IO®θ

=

ml^2 ®θ

®θ +^3 g 2 l

sin θ = 0

As we assumed θ is small,

®θ +^3 g 2 l

θ = 0

The frequency only depends on the length of the rod

ω^2 =

3 g 2 l

T =

2 π ω = 2π

s 2 l 3 g

l = 3 g 2 π^2

= 1.49 m

Figure 2.39: Double pendulum

(a) Compare the formula for the period, T = 2π

q 2 l 3 g with the well known formula for the period of a point mass hanging with a string with length l. T = 2π

q l g.

(b) Important!

In general, Eq. (2.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 fixed or not accelerating, as was the case here for point O.

  1. Write the equations of motion for the double-pendulum system shown in Fig. 2.39. 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.

Solution:

®θ 1 + g l

θ 1 +

k m

(θ 1 − θ 2 ) = 0

®θ 2 + g l

θ 2 +

k m

(θ 2 − θ 1 ) = 0

  1. Write the equations of motion for a body of mass M suspended from a fixed point by a spring with a constant k. Carefully define 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 define 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

mx® = −kx − mg.

We can manipulate the equation

mx® = −k

x +

m k

g

so if we replace x using y = x + mk g,

my® = −ky my® + ky = 0

18 CHAPTER 2. DYNAMIC MODELS

The equilibrium value of x including the effect of gravity is at x = − mk g 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 define 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 define y to be the motion with respect to the equilibrium point, then the FBD in (c) would result directly in

my® = −ky.

  1. For the car suspension discussed in Example 2.2,

(a) write the equations of motion (Eqs. (2.10) and (2.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.e., r is a unit step) using MATLAB. Assume that m 1 = 10 kg, m 2 = 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

®x = −

ks m 1

x −

b m 1

x ˙ +

ks m 1

y +

b m 1

y ˙ −

kw m 1

x +

kw m 1

r

μ ks m 1

kw m 1

x −

b m 1

x ˙ +

ks m 1

y +

b m 1

y ˙ +

kw m 1

r

y ® =

ks m 2

x +

b m 2

x ˙ −

ks m 2

y −

b m 2

y ˙

So, for the given sate vector of x = [ x x˙ y y˙ ]T^ , the state-space form will be,

x ˙ x ® y ˙ y ®

ks m 1 +^

kw m 1

− (^) mb 1 m^ ks 1 m^ b 1 0 0 0 1 ks m 2

b m 2 −^

ks m 2 −^

b m 2

x x ˙ y y ˙

kw m 1 0 0

 r

(b) Note that b is not the damping ratio, but damping. We need to find the proper order of magnitude for b, which can be done by trial and

20 CHAPTER 2. 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: 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.1f í,b ); title(ttl); end

  1. Automobile manufacturers are contemplating building active suspension systems. The simplest change is to make shock absorbers with a change- able damping, b(u 1 ). 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, u 2 , 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, u 2 , to completely replace the springs and shock absorber? Is this a good idea?

Solution:

(a) The FBD shows the addition of the variable force, u 2 , and shows b as in the FBD of Fig. 2.5, however, here b is a function of the control variable, u 1. The forces below are drawn in the direction that would result from a positive displacement of x.

m 1 ®x = b (u 1 ) ( y˙ − x˙) + ks (y − x) − kw (x − r) − u 2 m 2 y® = −ks (y − x) − b (u 1 ) ( y˙ − x˙) + u 2

(b) The system is linear with respect to u 2 because it is additive. But b is not constant so the system is non-linear with respect to u 1 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 orifice 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.

  1. Modify the equation of motion for the cruise control in Example 2.1, Eq(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 find the response for a unit step in vr using MATLAB. Using trial and error, find 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.

Solution:

Tim e (sec.)

A m plitude

Step Response

0 5 10 15 20 25 30 35 40 0

1

From: U(1)

To: Y (1) K =

K = K= 1000

K = 5000

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. You will find out how to eliminate this error in chapter 4 using integral control, which is contained in all cruise control systems in use today. For this problem, a reasonable compromise between speed of response and steady state errors would be K = 1000, where it responds is 5 seconds and the steady state error is 5%.

24 CHAPTER 2. DYNAMIC MODELS

% Problem 2. clear all, close all

% data m = 1000; b = 50; k = [ 100 500 1000 5000 ];

% Overlay the step response hold on for i=1:length(k) K=k(i); F = -(b+K)/m; G = K/m; H = 1; J = 0; step( F,G,H,J); end

Problems and Solutions for Section 2.

  1. In many mechanical positioning systems there is flexibility between one part of the system and another. An example is shown in Figure 2. where there is flexibility of the solar panels. Figure 2.40 depicts such a situation, where a force u is applied to the mass M and another mass m is connected to it. The coupling between the objects is often modeled by a spring constant k with a damping coefficient b, although the actual situation is usually much more complicated than this.

(a) Write the equations of motion governing this system, identify appro- priate state variables, and express these equations in state-variable form. (b) Find the transfer function between the control input, u, and the output, y.

Solution:

(a) The FBD for the system is

26 CHAPTER 2. DYNAMIC MODELS

From Cramerís Rule,

Y =

det

ms^2 + bs + k 0 − (bs + k) U

det

ms^2 + bs + k − (bs + k) − (bs + k) Ms^2 + bs + k

ms^2 + bs + k (ms^2 + bs + k) (M s^2 + bs + k) − (bs + k)^2

U

Finally,

Y

U

ms^2 + bs + k (ms^2 + bs + k) (Ms^2 + bs + k) − (bs + k)^2

=

ms^2 + bs + k mMs^4 + (m + M )bs^3 + (M + m)ks^2

  1. For the inverted pendulum, Eqs. (2.34),

(a) Try to put the equations of motion into state-variable form using the state vector x = [ (^) θ θ˙ x x˙ ]T^. Why is it not possible? (b) Write the equations in the ìdescriptorî form

E x˙ = F^0 x + G^0 u,

and define values for E, F^0 , and G^0 (note that E is a 4 ◊ 4 matrix). Then show how you would compute F and G for the standard state- variable description of the equations of motion.]

Solution:

(a) It is impossible because the acceleration terms are coupled. (b)    

0 I + mpl^2 0 −mpl 0 0 1 0 0 −mpl 0 mt + mp

θ^ ˙ ®θ x ˙ x ®

mpgl 0 0 0 0 0 0 1 0 0 0 −b

θ θ^ ˙ x x ˙

 u

E x˙ = F^0 x + G^0 u x ˙ = E−^1 F^0 x + E−^1 G^0 u

F = E−^1 F^0 , G = E−^1 G^0

  1. The longitudinal linearized equations of motion of a Boeing 747 are given in Eq. (9.28). Using MATLAB or other computer aid:

(a) Determine the response of the altitude h for a 2-sec pulse of the ele- vator with a magnitude of 2◦. Note that, since Eq. (9.28) represents a set of linearized equations, the state variables actually represent the deviation of the state from the nominal operating point. For example, h represents the amount the altitude of the aircraft differs from 20,000 ft.

(b) Consider using the feedback law

δe = Khh + δe,ext (127)

where the elevator input angle is the sum of a term proportional to the error in altitude h plus an external input (a disturbance or command input). Note from part (a) that a positive change in elevator causes a negative change in altitude, so that the proposed proportional feedback law has the logical sign to anticipate a stable system provided Kh > 0. By trial and error, try to find a value for the feedback gain Kh such that a 2◦^ pulse of 2 sec on δe,ext yields a more stable altitude response.

(c) If you have trouble finding a value of Kh that produces a stable response, try modifying the feedback law to include information on pitch rate q : δe = Khh + Kqq + δe,ext (128)

Use trial and error to pick appropriate values for both Kh and Kq. Assume the same type of pulse input for δe,ext as in part (b).

(d) Show that the further introduction of pitch-angle feedback, θ, such that

δe = Khh + Kqq + Kθθ + δe,ext (129)

allows you to decrease the time it takes for the altitude to settle back to its nominal value, as well as to decrease the value of Kh required for a stable response. Note that, although Kh = 0 produces stable altitude behavior, we require Kh > 0 in order to guarantee that h → 0 (so there will be no steady-state error).

Solution:

second. clear all, close all F = [ -0.00643 0.0263 0 -32.2 0; -0.0941 -0.624 820 0 0; -0.000222 -0.00153 -0.668 0 0; 0 0 1 0 0; 0 -1 0 830 0 ]; G = [ 0; -32.7; -2.08; 0; 0 ]; J = 0; x0 = [ 0; 0; 0; 0; 0 ];

% part a. Hh = [ 0 0 0 0 1 ]; [ num, den ] = ss2tf( F, G, Hh, J ); sysa = tf( num, den ); T = 0:0.01:10; u = (2/180pi)rectpuls( (T-2)/2 ); ya = lsim( sysa, u, T, x0 );

figure(1) plot(T,ya) title(í 2 deg. pulse applied between t = 1 and t =3 sec. í);

Problems and Solutions for Section 2.

  1. A first step toward a realistic model of an op amp is given by the equations below and shown in Fig. 2.41.

Vout =

s + 1

[V+ − V−]

i+ = i− = 0

(a) Find the transfer function of the simple amplification circuit shown using this model.

Solution:

(a) As i− = 0,

Vin − V− Rin

V− − Vout Rf

V− =

Rf Rin + Rf

Vin +

Rin Rin + Rf

Vout

30 CHAPTER 2. DYNAMIC MODELS

Figure 2.41: Circuit for Problem 11.

Figure 2.42: Circuit for Problem 12.

Vout =

s + 1

[V+ − V−]

s + 1

μ V+ −^

Rf Rin + Rf

Vin − Rin Rin + Rf

Vout

s + 1

μ Rf Rin + Rf

Vin +

Rin Rin + Rf

Vout

Vout Vin

− (^107) RinR+fRf s + 1 + 10^7 RinR+inRf

  1. Show that the op amp connection shown in Fig. 2.42 results in Vo = Vin if the op amp is ideal. Give the transfer function if the op amp has the non-ideal transfer function of Problem 2.11. Solution: