2-mathematical Modeling.pdf

  • Uploaded by: Fahad Ali
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View 2-mathematical Modeling.pdf as PDF for free.

More details

  • Words: 7,720
  • Pages: 91
Control Systems Mathematical Modeling

Muhammad Farooq Haydar Flight Dynamics and Control Center Department of Aeronautics and Astronautics Institute of Space Technology, Islamabad

March 12, 2019

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

1 / 40

Recap

Week 1: Introduction Review from to Feedback last weekand Control Control =

Actuate

Sense

Feedback Control: Sensing + Computation + Sensing + Computation + Actuation: Actuation This course is mainly about input design Principles Feedback I while considering the sensors and Robustness to Uncertainty the actuators Design of Dynamics

Compute

Many examples of feedback and control in natural & engineered systems: BIO ESE BIO ESE CS M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

2 / 40

Recap

Week 1: Introduction Review from to Feedback last weekand Control Control =

Actuate

Sense

Feedback Control: Sensing + Computation + Sensing + Computation + Actuation: Actuation This course is mainly about input design Principles Feedback I while considering the sensors and Robustness to Uncertainty the actuators Design of Dynamics

Compute

Feedback Principles:

Many examples of feedback and control in natural & engineered systems:

Robustness to I I

BIO variations in system parameters (mass, stiffness, damping etc.) external disturbance (wind gusts etc.) ESE BIO ESE CS

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

2 / 40

Recap

Week 1: Introduction Review from to Feedback last weekand Control Control =

Actuate

Sense

Feedback Control: Sensing + Computation + Sensing + Computation + Actuation: Actuation This course is mainly about input design Principles Feedback I while considering the sensors and Robustness to Uncertainty the actuators Design of Dynamics

Compute

Feedback Principles:

Many examples of feedback and control in natural & engineered systems:

Robustness to

BIO variations in system parameters (mass, stiffness, damping etc.) I external disturbance (wind gusts etc.) ESE Design of Dynamics to achieve desired levels of BIO I natural frequency (speed of response) I damping ratio (stability) ESE I

CS M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

2 / 40

Model-Based Control Control (or input) design in a feedback system can be counter-intuitive.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

3 / 40

Model-Based Control Control (or input) design in a feedback system can be counter-intuitive. Design with hit-and-trial can be I I I

expensive dangerous inefficient.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

3 / 40

Model-Based Control Control (or input) design in a feedback system can be counter-intuitive. Design with hit-and-trial can be I I I

expensive dangerous inefficient.

A model is a mathematical approximation of a real system.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

3 / 40

Model-Based Control Control (or input) design in a feedback system can be counter-intuitive. Design with hit-and-trial can be I I I

expensive dangerous inefficient.

A model is a mathematical approximation of a real system. helps in control design by giving an idea how the system will respond to an input.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

3 / 40

Model-Based Control Control (or input) design in a feedback system can be counter-intuitive. Design with hit-and-trial can be I I I

expensive dangerous inefficient.

A model is a mathematical approximation of a real system. helps in control design by giving an idea how the system will respond to an input. needs not to be accurate for control design (feedback provides robustness via corrective actions).

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

3 / 40

Mass Spring Damper System Questions to be answered: How does the mass move if the forcing frequency changes? How variations in mass/stiffness/damping affect the response of system?

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

4 / 40

Mass Spring Damper System Questions to be answered: How does the mass move if the forcing frequency changes? How variations in mass/stiffness/damping affect the response of system? To be used for simulations or control design?

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

4 / 40

Mass Spring Damper System Questions to be answered: How does the mass move if the forcing frequency changes? How variations in mass/stiffness/damping affect the response of system? To be used for simulations or control design?

Assumptions: Mass, spring and damper properties are fixed and exactly known. Springs satisfy Hooke’s law. Damper is a linear viscous force.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

4 / 40

Mass Spring Damper System

Writing the system’s equation using rigid-body mechanics: m¨ x + cx˙ + kx = F (t). Separating the acceleration term: x ¨=−

M. F. Haydar

(FlyCon, IST)

Control Systems

k F (t) c x˙ − x + . m m m

March 12, 2019

5 / 40

State of a dynamic system: For dynamic systems, input alone does not completely specify the evolution of the system.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

6 / 40

State of a dynamic system: For dynamic systems, input alone does not completely specify the evolution of the system. A vector of variable called “state” captures all the information needed in addition to input.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

6 / 40

State of a dynamic system: For dynamic systems, input alone does not completely specify the evolution of the system. A vector of variable called “state” captures all the information needed in addition to input. Consider a mass driven by an input (force): x ¨=

M. F. Haydar

(FlyCon, IST)

F (t) . m

Control Systems

March 12, 2019

6 / 40

State of a dynamic system: For dynamic systems, input alone does not completely specify the evolution of the system. A vector of variable called “state” captures all the information needed in addition to input. Consider a mass driven by an input (force): x ¨= I

F (t) . m

acceleration is completely determined by the input (force).

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

6 / 40

State of a dynamic system: For dynamic systems, input alone does not completely specify the evolution of the system. A vector of variable called “state” captures all the information needed in addition to input. Consider a mass driven by an input (force): x ¨= I I

F (t) . m

acceleration is completely determined by the input (force). velocity is calculated as Z t1 x˙ = x ¨dt + x˙ 0 . |{z} t0 | {z } initial velocity change in velocity

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

6 / 40

State of a dynamic system: For dynamic systems, input alone does not completely specify the evolution of the system. A vector of variable called “state” captures all the information needed in addition to input. Consider a mass driven by an input (force): x ¨= I I

F (t) . m

acceleration is completely determined by the input (force). velocity is calculated as Z t1 x˙ = x ¨dt + x˙ 0 . |{z} t0 | {z } initial velocity change in velocity

I

position is calculated as Z x=

t1

t0

| M. F. Haydar

(FlyCon, IST)

Z

t1

 x ¨dt + x˙ 0 dt +

t0

{z

change in position Control Systems

}

x0 |{z}

.

initial position

March 12, 2019

6 / 40

Mass Spring Damper System: State Space Form

Can you identify the state variable in the system? x ¨=−

M. F. Haydar

(FlyCon, IST)

c k F (t) x˙ − x + . m m m

Control Systems

March 12, 2019

7 / 40

Mass Spring Damper System: State Space Form

Can you identify the state variable in the system? x ¨=−

c k F (t) x˙ − x + . m m m

The state of the mass spring damper system is comprised of position (x) and velocity (x) ˙ of the mass.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

7 / 40

Mass Spring Damper System: State Space Form

Can you identify the state variable in the system? x ¨=−

c k F (t) x˙ − x + . m m m

The state of the mass spring damper system is comprised of position (x) and velocity (x) ˙ of the mass. The number of states is equal to number of integrators present in the system, I

called order of the system.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

7 / 40

Mass Spring Damper System: State Space Form

Can you identify the state variable in the system? x ¨=−

c k F (t) x˙ − x + . m m m

The state of the mass spring damper system is comprised of position (x) and velocity (x) ˙ of the mass. The number of states is equal to number of integrators present in the system, I

called order of the system.

Accelerations are not part of the state, because they can be calculated without integration.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

7 / 40

Mass Spring Damper System: State Space Form If we write the state vector of mass spring damper system:     x1 x = . x2 x˙

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

8 / 40

Mass Spring Damper System: State Space Form If we write the state vector of mass spring damper system:     x1 x = . x2 x˙ Then we can write the model as a system of first order differential equations: x˙ 1 = x2 x˙ 2 = −

M. F. Haydar

(FlyCon, IST)

k c F (t) x1 − x2 + . m m m

Control Systems

March 12, 2019

8 / 40

Mass Spring Damper System: State Space Form If we write the state vector of mass spring damper system:     x1 x = . x2 x˙ Then we can write the model as a system of first order differential equations: x˙ 1 = x2 x˙ 2 = − Equivalently:

M. F. Haydar

(FlyCon, IST)

   0 x˙ 1 = k x˙ 2 −m |

k c F (t) x1 − x2 + . m m m     1 0 x1 + 1 [F (t)]. c x2 −m m {z }

˙ x=Ax+Bu

Control Systems

March 12, 2019

8 / 40

Mass Spring Damper System: State Space Form

The model of system can thus be written as a first order (matrix) differential equation:        0 1 0 x˙ 1 x1 = + 1 [F (t)]. (1) c k x˙ 2 x2 −m −m m | {z } ˙ x=Ax+Bu

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

9 / 40

Mass Spring Damper System: State Space Form

The model of system can thus be written as a first order (matrix) differential equation:        0 1 0 x˙ 1 x1 = + 1 [F (t)]. (1) c k x˙ 2 x2 −m −m m | {z } ˙ x=Ax+Bu

The output of the system can be taken as position, which is given by an algebraic equation:       x1 0 (2) y= 1 0 + [F (t)]. x2 0 {z } | y=Cx+Du

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

9 / 40

Mass Spring Damper System: State Space Form

The model of system can thus be written as a first order (matrix) differential equation:        0 1 0 x˙ 1 x1 = + 1 [F (t)]. (1) c k x˙ 2 x2 −m −m m | {z } ˙ x=Ax+Bu

The output of the system can be taken as position, which is given by an algebraic equation:       x1 0 (2) y= 1 0 + [F (t)]. x2 0 {z } | y=Cx+Du

Any idea why equations (1)-(2) are called “state-space” representation?

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

9 / 40

bles for all t ' t0 . State Vectors and State Space ables. he state vC here the apacitor State space pace. A e vector, articular vR

ferential are the

State vector, x(t) State vector trajectory

the outariables

efine the M. F. Haydar

State vector, x(4)

FIGURE 3.3 Graphic representation of state (FlyCon, IST)

Control Systems

March 12, 2019

10 / 40

State Space Form dx = f (x, u) dt y = h(x, u) Nonlinear system

M. F. Haydar

(FlyCon, IST)

dx = Ax + Bu dt y = Cx + Du Linear system

Control Systems

x ∈ Rn , u ∈ Rp ,

y ∈ Rm .

March 12, 2019

11 / 40

State Space Form dx = f (x, u) dt y = h(x, u) Nonlinear system

dx = Ax + Bu dt y = Cx + Du Linear system

x ∈ Rn , u ∈ Rp ,

y ∈ Rm .

Linear ODE (higher order):

dn q dn−1 q dq + a + ... + an−1 + an q = u. 1 dtn dtn−1 dt n−1 d q dq y = b1 n−1 + ... + bn−1 + bn q dt dt

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

11 / 40

State Space Form dx = f (x, u) dt y = h(x, u) Nonlinear system

dx = Ax + Bu dt y = Cx + Du Linear system

x ∈ Rn , u ∈ Rp ,

y ∈ Rm .

Linear ODE (higher order):

dn q dn−1 q dq + a + ... + an−1 + an q = u. 1 dtn dtn−1 dt n−1 d q dq y = b1 n−1 + ... + bn−1 + bn q dt dt How can this ODE be written as a system of first order ODEs?

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

11 / 40

dn−1 q dq dn q + a1 n−1 + ... + an−1 + an q = u. n dt dt dt dn−1 q dq y = b1 n−1 + ... + bn−1 + bn q dt dt    q  x1 dq   x2   dt      ..    =⇒ x =  ...  =  .  ,    dn−2 q  xn−1    dtn−2  dn−1 q xn n−1 dt

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

12 / 40

dn−1 q dq dn q + a1 n−1 + ... + an−1 + an q = u. n dt dt dt dn−1 q dq y = b1 n−1 + ... + bn−1 + bn q dt dt    q  x1 dq   x2   dt      ..    =⇒ x =  ...  =  .  ,    dn−2 q  xn−1    dtn−2  dn−1 q xn n−1 dt



x1 x2 .. .





0 0 .. .

     d      =   dt  xn−1   0 xn −an M. F. Haydar

(FlyCon, IST)

1 0

0 1

··· ···

    0 x1 1  x2  0 0        ..   ..    .  + . u     1  xn−1  0 −a1 xn 0

0 0 ··· −an−1 −an−2 · · ·   y = b1 b2 . . . bn x + Du Control Systems

March 12, 2019

12 / 40

State Space Form

Choice of state is not unique. I I

different choices of units, sums and differences of mass positions.

Inputs are external to the system. Outputs are the variables which we can measure. Different types of models for different purposes: I I I

ordinary differential equations for rigid body mechanics partial differential equations for fluid flow, solid mechanics finite state machines for manufacturing, logic controllers

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

13 / 40

Quarter-Car Suspension

Figure: (a) passive suspension, (b) full-active suspension, (c) hydraulic-active suspension.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

14 / 40

Quarter-Car Model Questions to be answered: How do the road-bumps affect the compartment at different frequencies? I

at which speed should I drive on this rough road?

A stiff suspension is better or a soft one? How variations in loading/mass affect the comfort level?

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

15 / 40

Quarter-Car Model Questions to be answered: How do the road-bumps affect the compartment at different frequencies? I

at which speed should I drive on this rough road?

A stiff suspension is better or a soft one? How variations in loading/mass affect the comfort level?

Assumptions: Mass, spring and damper properties are fixed and exactly known. Springs satisfy Hooke’s law. Damper is a linear viscous force.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

15 / 40

Quarter-Car Model

Writing the system’s equation using rigid-body mechanics: ms z¨s = −cs (z˙s − z˙us ) − ks (zs − zus )

(3)

mus z¨us = cs (z˙s − z˙us ) + ks (zs − zus ) − kt (zus − zr ) (4)

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

16 / 40

Quarter-Car Model: State Space Form

Can you identify the state variable in the system? ms z¨s = −cs (z˙s − z˙us ) − ks (zs − zus )

mus z¨us = cs (z˙s − z˙us ) + ks (zs − zus ) − kt (zus − zr )

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

17 / 40

Quarter-Car Model: State Space Form

Can you identify the state variable in the system? ms z¨s = −cs (z˙s − z˙us ) − ks (zs − zus )

mus z¨us = cs (z˙s − z˙us ) + ks (zs − zus ) − kt (zus − zr ) The state of the quarter car model is comprised of positions ( zs , zus ) and velocities ( z˙s , z˙us ) of both masses.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

17 / 40

Quarter-Car Model: State Space Form If we write the state vector of quarter-car model:     x1 zs x2  zus    =  . x3   z˙s  x4 z˙us

Then we can write the model as system of first order differential equations: x˙ 1 = x3 x˙ 2 = x4 kus cs cus ks x1 + x2 − x3 + x4 ms ms ms ms ks (kus + kt ) cs cus kt x˙ 4 = x1 − x2 + x3 − x4 + zr . mus mus mus mus mus x˙ 3 = −

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

18 / 40

Quarter-Car Model: State Space Form Equivalently:    0 x˙ 1 x˙ 2   0   =  ks x˙ 3  − m s ks x˙ 4 mus |

M. F. Haydar

(FlyCon, IST)

0 0

1 0

kus ms (kus +kt ) − mus

cs −m s cs mus

{z

˙ x=Ax+Bu

Control Systems

    0 0 x1 1  x2   0   cus    +   x3   0  [zr ] ms kt cus x4 mus mus }

March 12, 2019

19 / 40

Quarter-Car Model: State Space Form Equivalently:    0 x˙ 1 x˙ 2   0   =  ks x˙ 3  − m s ks x˙ 4 mus |

0 0

1 0

kus ms (kus +kt ) − mus

cs −m s cs mus

{z

˙ x=Ax+Bu

    0 0 x1 1  x2   0   cus    +   x3   0  [zr ] ms kt cus x4 mus mus }

The output of the system can be taken as position of sprung mass, or possibly even unsprung mass as:     x1   1 0 0 0  x2  0   y= + [z ]. 0 1 0 0 x3  0 r x4 {z } | y=Cx+Du

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

19 / 40

Linearization

Problem: almost every practical system is nonlinear!

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

20 / 40

Linearization

Problem: almost every practical system is nonlinear! Idea: use first order Taylor series approximation around the equilibrium point.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

20 / 40

Linearization

Problem: almost every practical system is nonlinear! Idea: use first order Taylor series approximation around the equilibrium point. Rationale: Feedback can provide corrective action against minor errors arising from linear approximation:

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

20 / 40

Linearization

Figure: Approximation of sin(x) with Taylor series (degree of the Taylor polynomial 1,3,5,7,9,11,13). M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

21 / 40

Linearization

Linearization is always specific to the operating/equilibrium point. A nonlinear system can be approximated by infinitely many linear systems at different operating points. M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

22 / 40

length of the pendulum. Assume the mass is evenly distributed, with the center of mass at L/2. Then linearize the state equations about the pendulum’s equilibrium point—the vertical position with zero angular velocity.

Example

L

J

2

T

T

θ

Mg

θ

Mg cos θ

d 2θ dt2

MgL sin θ 2

θ

L 2

Mg sin θ

Mg

FIGURE 3.14

(a)

(b)

(c)

a. Simple pendulum; b. force components of Mg; c. free-body diagram

SOLUTION: First draw a free-body diagram as shown in Figure 3.14(c). Summing torques, we get M. F. Haydar

(FlyCon, IST)

d2 θ

MgL

Control Systems

March 12, 2019

23 / 40

length of the pendulum. Assume the mass is evenly distributed, with the center of mass at L/2. Then linearize the state equations about the pendulum’s equilibrium point—the vertical position with zero angular velocity.

Example

We can take the states: L

J

2

T

T

θ

Mg

θ

Mg cos θ

d 2θ dt2

MgL sin θ 2

θ

L 2

Mg sin θ

Mg

FIGURE 3.14

Solution:

(a)

(b)

(c)

a. Simple pendulum; b. force components of Mg; c. free-body diagram

d2 θ M gL J 2 + sin θ = T dt 2 SOLUTION: First draw a free-body diagram as shown in Figure 3.14(c). Summing torques, we get M. F. Haydar

(FlyCon, IST)

d2 θ

MgL

Control Systems

March 12, 2019

23 / 40

length of the pendulum. Assume the mass is evenly distributed, with the center of mass at L/2. Then linearize the state equations about the pendulum’s equilibrium point—the vertical position with zero angular velocity.

Example

We can take the states: L

d 2θ

2

T

θ

Mg

θ

J 2 x1 = θ dt T dθ Mg cos θ x2 = dt θ

MgL sin θ 2

L 2

Mg sin θ

Mg

FIGURE 3.14

Solution:

(a)

(b)

(c)

a. Simple pendulum; b. force components of Mg; c. free-body diagram

d2 θ M gL J 2 + sin θ = T dt 2 SOLUTION: First draw a free-body diagram as shown in Figure 3.14(c). Summing torques, we get M. F. Haydar

(FlyCon, IST)

d2 θ

MgL

Control Systems

March 12, 2019

23 / 40

length of the pendulum. Assume the mass is evenly distributed, with the center of mass at L/2. Then linearize the state equations about the pendulum’s equilibrium point—the vertical position with zero angular velocity.

Example

We can take the states: L

d 2θ

2

T

θ

Mg

θ

J 2 x1 = θ dt T dθ Mg cos θ x2 = dt θ

MgL sin θ 2

L 2

x˙ 1 = x2 Mg sin θ M gL T x˙ 2 = − sin x1 + 2J J(c) (b)

Mg

FIGURE 3.14

Solution:

(a)

a. Simple pendulum; b. force components of Mg; c. free-body diagram

d2 θ M gL J 2 + sin θ = T dt 2 SOLUTION: First draw a free-body diagram as shown in Figure 3.14(c). Summing torques, we get M. F. Haydar

(FlyCon, IST)

d2 θ

MgL

Control Systems

March 12, 2019

23 / 40

length of the pendulum. Assume the mass is evenly distributed, with the center of mass at L/2. Then linearize the state equations about the pendulum’s equilibrium point—the vertical position with zero angular velocity.

Example

We can take the states: L

d 2θ

2

T

θ

Mg

θ

J 2 x1 = θ dt T dθ Mg cos θ x2 = dt θ

MgL sin θ 2

L 2

x˙ 1 = x2 Mg sin θ M gL T x˙ 2 = − sin x1 + 2J J(c) (b)

Mg

FIGURE 3.14

(a)

Solution:

a. Simple pendulum; b. forceIscomponents of Mg;model c. free-body the state space linear?diagram d2 θ M gL J 2 + sin θ = T dt 2 SOLUTION: First draw a free-body diagram as shown in Figure 3.14(c). Summing torques, we get M. F. Haydar

(FlyCon, IST)

d2 θ

MgL

Control Systems

March 12, 2019

23 / 40

length of the pendulum. Assume the mass is evenly distributed, with the center of mass at L/2. Then linearize the state equations about the pendulum’s equilibrium point—the vertical position with zero angular velocity.

Example

We can take the states: L

d 2θ

2

T

θ

Mg

θ

J 2 x1 = θ dt T dθ Mg cos θ x2 = dt θ

MgL sin θ 2

L 2

x˙ 1 = x2 Mg sin θ M gL T x˙ 2 = − sin x1 + 2J J(c) (b)

Mg

FIGURE 3.14

(a)

Solution:

a. Simple pendulum; b. forceIscomponents of Mg;model c. free-body the state space linear?diagram d2 θ M gL J 2 + sin θ = T How can we linearize this system? dt 2 SOLUTION: First draw a free-body diagram as shown in Figure 3.14(c). Summing torques, we get M. F. Haydar

(FlyCon, IST)

d2 θ

MgL

Control Systems

March 12, 2019

23 / 40

x˙ 1 = x2 M gL T x˙ 2 = − sin x1 + 2J J for small x1 (which is θ) sin x1 ≈ x1 x˙ 1 = x2 M gL T x˙ 2 ≈ − x1 + 2J J

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

24 / 40

x˙ 1 = x2 M gL T x˙ 2 = − sin x1 + 2J J for small x1 (which is θ) sin x1 ≈ x1 x˙ 1 = x2 M gL T x˙ 2 ≈ − x1 + 2J J The linearized state space model (around the downward equilibrium point):        0 1 x1 0 x˙ 1 + 1 T ≈ x˙ 2 − M2JgL 0 x2 J

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

24 / 40

x˙ 1 = x2 M gL T x˙ 2 = − sin x1 + 2J J What will be the linearized model around upright equilibrium point?

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

25 / 40

x˙ 1 = x2 M gL T x˙ 2 = − sin x1 + 2J J What will be the linearized model around upright equilibrium point? for small x1 (which is θ) sin x1 ≈ −x1

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

25 / 40

x˙ 1 = x2 M gL T x˙ 2 = − sin x1 + 2J J What will be the linearized model around upright equilibrium point? for small x1 (which is θ) sin x1 ≈ −x1 x˙ 1 = x2 M gL T x1 + x˙ 2 ≈ 2J J

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

25 / 40

x˙ 1 = x2 M gL T x˙ 2 = − sin x1 + 2J J What will be the linearized model around upright equilibrium point? for small x1 (which is θ) sin x1 ≈ −x1 x˙ 1 = x2 M gL T x1 + x˙ 2 ≈ 2J J The linearized state space model around upright equilibrium point:        0 1 x1 0 x˙ 1 ≈ M gL + 1 T x˙ 2 x 0 2 J 2J M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

25 / 40

x˙ 1 = x2 M gL T x˙ 2 = − sin x1 + 2J J

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

26 / 40

x˙ 1 = x2 M gL T x˙ 2 = − sin x1 + 2J J Writing in matrix form:    0 x˙ 1 = x˙ 2 − M2JgL sin x1

M. F. Haydar

(FlyCon, IST)

Control Systems

   1 0 + 1 T 0 J

March 12, 2019

26 / 40

x˙ 1 = x2 M gL T x˙ 2 = − sin x1 + 2J J Writing in matrix form:    0 x˙ 1 = x˙ 2 − M2JgL sin x1

   1 0 + 1 T 0 J

Taking the Jacobian at origion also gives:    0 x˙ 1 = 1 : x˙ 2 cos 0 − M2JgL

   1 0 + 1 T 0 J

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

26 / 40

x˙ 1 = x2 M gL T x˙ 2 = − sin x1 + 2J J Writing in matrix form:    0 x˙ 1 = x˙ 2 − M2JgL sin x1

   1 0 + 1 T 0 J

Taking the Jacobian at origion also gives:    0 x˙ 1 = 1 : x˙ 2 cos 0 − M2JgL

   1 0 + 1 T 0 J

Jacobian provides a linear approximation (i.e., tangent plane) in the multivariable case.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

26 / 40

Case Study: Inverted Pendulum



   l l ¨ cos θ θ − m1 sin θ θ˙2 + bz˙ = F (m1 + m2 ) z¨ + m1 z2 z˙ 2       ✓ 2 l l l m1 cos sin θ ` θ z¨ + m1 m1 θ¨ = m1 g 2 4 2 F z bz˙ M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

✓˙

27 / 40

Case Study: Inverted Pendulum 

   l l ¨ (m1 + m2 ) z¨ + m1 cos θ θ − m1 sin θ θ˙2 + bz˙ = F 2 2       l l2 ¨ l m1 cos θ z¨ + m1 θ = m1 g sin θ 2 4 2

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

28 / 40

Case Study: Inverted Pendulum 

   l l ¨ (m1 + m2 ) z¨ + m1 cos θ θ − m1 sin θ θ˙2 + bz˙ = F 2 2       l l2 ¨ l m1 cos θ z¨ + m1 θ = m1 g sin θ 2 4 2  ¯ F¯ which is found Lets linearize the equation around the equilibrium point z¯, θ, by setting z˙ = z¨ = θ˙ = θ¨ = 0.

m1 g

M. F. Haydar

(FlyCon, IST)



F¯ = 0,  l sin θ = 0. 2

Control Systems

March 12, 2019

28 / 40

Case Study: Inverted Pendulum 

   l l ¨ (m1 + m2 ) z¨ + m1 cos θ θ − m1 sin θ θ˙2 + bz˙ = F 2 2       l l2 ¨ l m1 cos θ z¨ + m1 θ = m1 g sin θ 2 4 2  ¯ F¯ which is found Lets linearize the equation around the equilibrium point z¯, θ, by setting z˙ = z¨ = θ˙ = θ¨ = 0.

m1 g



F¯ = 0,  l sin θ = 0. 2

Thus, any point θ¯ = nπ can be an equilibrium point (for integer n), if external force F¯ is zero. Linearization can be performed either I I

by taking Jacobian of the nonlinear state space equations, or by linearizing each term and then converting to state space form.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

28 / 40

Case Study: Inverted Pendulum Thus linearizing around the “inverted” position (i.e., θ¯ = 0 ± kπ where k is an even integer):

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

29 / 40

Case Study: Inverted Pendulum Thus linearizing around the “inverted” position (i.e., θ¯ = 0 ± kπ where k is an even integer):      ∂  ∂  ¨ ¯ ¨ ¯ ¨ ¨ ¯ cos θθ ¨ θ − θ + cos θθ θ¨ − θ¨¯ cos θθ ≈ cos θθ + ¯ θ) ¯ ∂θ (θ, ¨ ¯ θ) ¯ ∂ θ¨ (θ,   ¯ (δθ) + cos θ¯ δ θ¨ ¯ − sin θ¯θ¨ = cos θ¯θ¨ = δ θ¨

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

29 / 40

Case Study: Inverted Pendulum Thus linearizing around the “inverted” position (i.e., θ¯ = 0 ± kπ where k is an even integer):      ∂  ∂  ¨ ¯ ¨ ¯ ¨ ¨ ¯ cos θθ ¨ θ − θ + cos θθ θ¨ − θ¨¯ cos θθ ≈ cos θθ + ¯ θ) ¯ ∂θ (θ, ¨ ¯ θ) ¯ ∂ θ¨ (θ,   ¯ (δθ) + cos θ¯ δ θ¨ ¯ − sin θ¯θ¨ = cos θ¯θ¨ = δ θ¨

     ∂  ∂  sin θθ˙2 ≈ sin θ¯θ¯˙2 + sin θθ˙2 ˙ θ − θ¯ + sin θθ˙2 θ˙ − θ¯˙ ¯ θ) ¯ ∂θ (θ, ¯ θ) ¯˙ ∂ θ˙ (θ,   = sin θ¯θ¯˙2 + cos θ¯ (δθ) θ¯˙2 + 2θ¯˙ sin θ¯ δ θ¯˙ =0

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

29 / 40

Case Study: Inverted Pendulum

 ∂ ¯ + ∂ (cos θ¨ (cos θ¨ z )|(θ, θ − θ z ) cos θ¨ z ≈ cos θ¯z¨ ¯+ z − z¨¯) ¯ z¨ ¯) ¯ (¨ ∂θ ∂ z¨ (θ,z¨ ¯) = cos θ¯z¨ ¯ − sin θ¯ (δθ) z¨ ¯ + cos θ¯ (δ¨ z) = δ¨ z

 ∂ ¯ (sin θ)|(θ) ¯ θ−θ ∂θ = sin θ¯ + cos θ¯ (δθ)

sin θ ≈ sin θ¯ + = δθ

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

30 / 40

Case Study: Inverted Pendulum

Linearized Model: l (m1 + m2 ) δ¨ z + m1 δ θ¨ + bz˙ = δF 2 l2 l l z + m1 δ θ¨ = m1 g δθ m1 δ¨ 2 4 2

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

31 / 40

Case Study: Inverted Pendulum

Linearized Model: l (m1 + m2 ) δ¨ z + m1 δ θ¨ + bz˙ = δF 2 l2 l l z + m1 δ θ¨ = m1 g δθ m1 δ¨ 2 4 2

Note: It is common in literature to drop δ with the variables, but one should never forget that linearized models only work with small deviations.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

31 / 40

Case Study: Inverted Pendulum

l (m1 + m2 ) z¨ + m1 θ¨ + bz˙ = F 2 l l2 ¨ l m1 z¨ + m1 θ = m1 g θ 2 4 2

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

32 / 40

Case Study: Inverted Pendulum

l (m1 + m2 ) z¨ + m1 θ¨ + bz˙ = F 2 l l2 ¨ l m1 z¨ + m1 θ = m1 g θ 2 4 2 after solving for z¨ and θ¨ b m1 g F z˙ − θ+ m2 m2 m2 b (m + m 2F 1 2 )g θ¨ = 2 z˙ + θ− m2 l m2 l m2 l

z¨ = −

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

32 / 40

Case Study: Inverted Pendulum b m1 g F z˙ − θ+ m2 m2 m2 2(m + m 2F b 1 2 )g z˙ + θ− θ¨ = 2 m2 l m2 l m2 l

z¨ = −

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

33 / 40

Case Study: Inverted Pendulum b m1 g F z˙ − θ+ m2 m2 m2 2(m + m 2F b 1 2 )g z˙ + θ− θ¨ = 2 m2 l m2 l m2 l

z¨ = −

    z x1 x2  z˙   =  x3  θ  x4 θ˙

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

33 / 40

Case Study: Inverted Pendulum b m1 g F z˙ − θ+ m2 m2 m2 2(m + m 2F b 1 2 )g z˙ + θ− θ¨ = 2 m2 l m2 l m2 l

z¨ = −

   0 x1  0 d  x 2  = dt x3  0 x4 0

1 − mb2 0 2 mb2 l

 y= 0

M. F. Haydar

(FlyCon, IST)

    z x1 x2  z˙   =  x3  θ  x4 θ˙ 0

1g −m m2

0

2(m1 +m2 )g m2 l

0

1

    0 0 x1 0 x2   m1     +  2  [F ] 1 x3   0  − m22 l 0 x4

     0 x + 0 F

Control Systems

March 12, 2019

33 / 40

Case Study: Satellite Attitude Control

Js ✓ Rotational spring k and damper b at joint Jp

Jp k Js M. F. Haydar

(FlyCon, IST)

  Js θ¨ = τ − b θ˙ − φ˙ − k (θ − φ)   Jp φ¨ = b θ˙ − φ˙ + k (θ − φ) b Control Systems

✓ March 12, 2019

34 / 40

Case Study: Satellite Attitude Control   Js θ¨ = τ − b θ˙ − φ˙ − k (θ − φ)   Jp φ¨ = b θ˙ − φ˙ + k (θ − φ)

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

35 / 40

Case Study: Satellite Attitude Control   Js θ¨ = τ − b θ˙ − φ˙ − k (θ − φ)   Jp φ¨ = b θ˙ − φ˙ + k (θ − φ)     θ x1 x2   θ˙   =  x3  φ x4 φ˙

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

35 / 40

Case Study: Satellite Attitude Control   Js θ¨ = τ − b θ˙ − φ˙ − k (θ − φ)   Jp φ¨ = b θ˙ − φ˙ + k (θ − φ)     θ x1 x2   θ˙   =  x3  φ x4 φ˙

       0 1 0 0 0 x1 x1 k k   1    − Jk − Jb d  x x 2 2 Js Js    s  Js  [F ]  = s + 0 0 1  x3   0  dt x3   0 k k k b x4 x4 − − 0 Js Js Js Js     1 0 0 0   0   x + F y= −1 1 0 0 0 M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

35 / 40

Example: Vectored Thrust Aircraft 3-32

CHAPTER 3. SYSTEM MODELING

θ

r

y F2

x (a) Harrier “jump jet”

F1

(b) Simplified model

Figure 3.18: Vectored thrust aircraft. The Harrier AV-8B military aircraft (a) redirects its engine thrust downward so that it can “hover” above the ground. Some air from the engine is diverted to the wing tips to be used for maneuvering. As shown in (b), the net thrust on the aircraft can be decomposed into a horizontal force F1 and a vertical force F2 acting at a distance r from the center of mass.

front-wheel steering. The figure shows that the model also applies to rear wheel steering if the sign of the velocity is reversed. ∇ Example 3.11 Vectored thrust aircraft

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

36 / 40



steering if the sign of the velocity is reversed.

Example: Vectored Thrust Aircraft

Example 3.11 Vectored thrust aircraft 3-32 CHAPTER 3. SYSTEM MODELING Consider the motion of vectored thrust aircraft, such as the Harrier “jump jet” shown Figure 3.18a. The Harrier is capable of verticalθtakeoff by redirecting its thrust downward and through the use of smaller maneuvering thrusters located on its wings. A simplified model of the Harrier is shown in Figure 3.18b, where we focus on the motion of the vehicle in a vertical plane through the wings of the aircraft. We resolve the forces generated by the main downward thruster and the r maneuvering thrusters as a pair of forces F1 andy F2 acting at a distance r below the F2 aircraft (determined by the geometry of the thrusters). Let (x, y, θ ) denote the position and orientation of the center of mass of the x F aircraft. Let m be the mass of the vehicle, J the moment of inertia,1 g the gravita(a) Harrier “jump jet” (b) Simplified model tional constant and c the damping coefficient. Then the equations of motion for the Figure 3.18: Vectored thrust aircraft. The Harrier AV-8B military aircraft (a) redirects its vehicle areengine given bydownward so that it can “hover” above the ground. Some air from the engine thrust is diverted to the wing tips to be used for maneuvering. As shown in (b), the net thrust on θ − F2 sin cx, mx¨ = F1into cosa horizontal the aircraft can be decomposed forceθF1− and a˙ vertical force F2 acting at a distance r from the center of mass.

˙ my¨ = F1 sin θ + F2 cos θ − mg − cy, ¨ = figure J θThe rF1 . shows that the model also applies to rear wheel front-wheel steering. steering if the sign of the velocity is reversed.



(3.29)

It is convenient to redefine the inputs so that the origin is an equilibrium point Examplewith 3.11 zero Vectored thrust aircraftu = F and u = F − mg, the equations of the input. Letting 1 1 2 2 M. F.system Haydar (FlyCon, IST) Control Systems March 12, 2019 36 / 40

Frequency Response Models 3-24

CHAPTER 3. SYSTEM MODELIN 1

10 Gain (log scale)

4

Output y

2 0 −2

0

10

−1

10

−2

−4 0

10

10

20 30 Time [s]

40

50

−1

10

0

10 Frequency [rad/sec] (log scale)

1

10

Figure 3.12: A frequency response (gain only) computed by measuring the response of individual sinusoids. The figure on the left shows the response of the system as a function of time to a number of different unit magnitude inputs (at different frequencies). The figure on the right shows this same data in a different way, with the magnitude of the response plotted as a function of the input frequency. The filled circles correspond to the particular M. F. Haydar shown (FlyCon, in IST) Control Systems March 12, 2019 37 / 40 frequencies the time responses.

Block Diagrams Problem: Real systems are very complicated and its hard to follow the effects of different inputs individually.

Idea: focus only on the information flow and ignore the details of the system. 3.3. MODELING METHODOLOGY 3-25 u2 u1

Σ

u1 + u2

(a) Summing junction u

f (u)

(d) Nonlinear map

u

k

ku

u

(b) Gain block u

!

! t 0

(e) Integrator

sat(u)

(c) Saturation u(t) dt

u

System

y

(f) Input/output system

Figure 3.14: Standard block diagram elements. The arrows indicate the the inputs and outputs of each element, with the mathematical operation corresponding to the blocked labeled at the output. The system block (f) represents the full input/output response of a dynamical M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 38 / 40

Block Diagrams: Insect Flight Control Systems 3-26

CHAPTER 3. SYSTEM MODELING (d) Drag Aerodynamics

Ref

Σ

(a) Sensory Motor System

−1

(b) Wing Aerodynamics

Σ

Wind

(c) Body Dynamics

(e) Vision System

Figure 3.15: A block diagram representation of the flight control system for an insect flying against the wind. The mechanical portion of the model consists of the rigid-body dynamics of the fly, the drag due to flying through the air and the forces generated by the wings. The motion of the body causes the visual environment of the fly to change, and this information is then used to control the motion of the wings (through the sensory motor system), closing M.the F. Haydar Control Systems March 12, 2019 39 / 40 loop. (FlyCon, IST)

What is next?

We will learn how to analyze models. I

examine the dynamic characteristics of systems using models.

Check if the dynamic properties of the system match our desired properties. Design controllers to tweak the dynamic properties.

M. F. Haydar

(FlyCon, IST)

Control Systems

March 12, 2019

40 / 40

More Documents from "Fahad Ali"