Week 2 lecture notes. Introduction to modelling and control PDF

Title Week 2 lecture notes. Introduction to modelling and control
Author Jack Smith
Course Applied Mathematical Modelling
Institution University of Melbourne
Pages 16
File Size 697.2 KB
File Type PDF
Total Downloads 37
Total Views 168

Summary

This document includes week 2 material of the modelling and control course....


Description

ENGG2440/6400 — Modelling and Control Week 2 Summary E-mail: Consultation: Questions?

[email protected] Tuesday 12 pm - 2 pm Ask Alejandro in consultation

We concluded last week with a simple state-space modelling problem, and have thus far ‘turned the handle’ with no understanding of ‘how’ or ‘why’ states, CCRs or SSRs are chosen. This week we aim to develop some of that understanding. The benefit of the regimented modelling procedure we teach in ENGG2440 is that it is largely invariant to the domain you are working in. That is to say, you follow the same rules whether your system is mechanical, electrical, fluid power, or a combination thereof. In this, the first week of ‘actual’ modelling, we will begin with the simplest domain — Translational Mechanical Systems.

1

Intro to Translational Mechanical Systems

Translational Mechanical Systems are, as the name suggests, those which contain mechanical components that are free only to translate, not rotate. These kinds of bodies act as ‘point masses’, which you have potentially met before (PHYS1205, PHYS1210, MECH2360, High-school Physics, etc.). When treating a body as a point mass, it’s size and shape is unimportant — these properties do not affect how it moves. As such, we largely disregard these qualities in our modelling. In this course, we will restrict our analysis to rectilinear (one dimensional) motion, but be mindful that this concept can be extended to 2D and 3D motion (the rules remain the same, but there are more variables to track).

1.1

Choosing States in Translational Mechanical Systems

To understand how many states we require to model mechanical translational systems, we must first briefly revise the notion of Degrees of Freedom.

Key Point: For a translational mechanical system of N disconnected masses m1 , m2 , . . . mN that can each move n1 , n2 , . . . nN independent ways, the total number of degrees of freedom D present is: NDOF = n1 + n2 + . . . nN That is, the number of degrees of freedom is equal to the number of unique ways that all the disconnected masses in the system can move. In this context, disconnected masses are those which cannot have their position described as a static function of eachother. For example, if two masses are linked by a rigid bar, the position of the second can always be written as a constant offset from the position of the first — in this case, they are NOT disconnected and can be modelled as a single mass.

Warning! In cases of non-rectilinear motion, it is possible for bodies to be connected or constrained in one component of translation, but not others. In these cases, you will need to think carefully about how to treat these masses.

1

Key Point: As a general rule, for mechanical systems we require twice as many states as there are Degrees of Freedom in the system: Nstates = 2 × NDOF

2

Basic Components in Translational Systems

2.1

Point Masses

We will in this course model masses as rigid bodies. We assume the masses cannot deform or otherwise change shape or size. When we are only considering translation, these rigid bodies are further simplified such that their shape has no intrinsic impact on their movement. In this way, they act as ‘point masses’. Bodies with mass behave according to Newton’s laws. Three fundamental characteristics of masses are important to us: 1. Masses store kinetic energy Ek with increasing velocity. If a mass has reached constant velocity, Newton’s 1st law states that work must be done on it for it to speed up or slow down (i.e. it must be acted on by a force. The kinetic energy stored by a point mass m at a velocity v is given by: Ek =

1 mv2 2

2. The acceleration ax (t) = x¨(t) a mass experiences is related to the net force acting on it ΣFx (t) by Newton’s second law: X Fx (t) = max (t) = m¨ x(t) 3. The linear momentum Px (t) of an object is the amount of ‘oomph’ it has in it’s direction of motion. We define this quantity as the product of mass and velocity: Px (t) = mvx (t) = mx(t). ˙ A keen observer will note that linear momentum is the time integral of the net force acting on an object.

Key Point: These three characteristics give rise to the key component constitutive relationships (CCRs) for point masses: CCR 1: CCR 1:

P = mv P˙ = ΣF

There are a few things to keep in mind when applying these relations: 1. These are vector quantities — they have magnitude and direction! 2. You must be extremely careful to ensure that the momentum of the object is defined positive in the direction of motion (since momentum is a constant multiplied by velocity, which shares a positive direction with position). 3. You must also be extremely careful to ensure that the NET force of the mass is taken as positive in the direction of motion. The SSR for masses (Newton’s second law) is applied by drawing a free body diagram. It is a good idea to draw the direction of motion clearly on your free-body diagram to remind you. Any force acting in this direction should be taken as positive in the sum, and any force opposite this direction negative. If nothing else, this is a chance for you to get partial marks on an exam if you completely mess up the rest of the question! 2

2.2

Ideal Springs

You have no doubt met a spring before — perhaps as a coiled piece of metal that stretches and compresses with applied loads, but returns to it’s rest state when these loads are removed. Springs are only one embodiment of elasticity — a property that most solids display. We sometimes model other kinds of elasticity (i.e. that of couplings, shafts, etc) by approximating them as springs. For much of this course, we will adopt the ideal spring model, which comes with a number of modelling assumptions: 1. Ideal springs have no mass. 2. Ideal springs only store energy through elastic deformation. They do not ever plastically deform, and can stretch or compress to any length (i.e. never break). 3. Ideal springs have a linear relation between applied force and deformation.

Key Point: An ideal spring can be represented mathematically by the following component constituitive relation: CCR:

Fs =

1 δ c

Of course, you can incorporate more complex behaviour into your model if the system requires it (see progressive car springs, for example). In these cases, you will require a different CCR. The SSR for springs involves defining δ. This is in-general a nontrivial process. The definition of δ depends on: 1. The co-ordinate system(s) in use. 2. Whether co-ordinate(s) are measured from fixed reference(s) or the equilibrium position of the mass. 3. Whether you assume tension or compression for the spring.

Warning! Your assumption of tension/compression, equation for δ and the direction you draw the spring force on any relevant free-body diagrams must agree! As an example of how to correctly use the ideal spring CCR and SSR, consider the (reasonably common) arrangement of masses shown in Figure 1. Here, the system has two degrees of freedom, as the masses are disconnected. If spring length L = x2 (t) − x1 (t) ever exceeds the spring natural length ℓ0 , it will be in tension.

x1 (t) m1

m2 c x2 (t)

Figure 1: A common arrangement of masses connected by a spring.

3

So, if we assume tension, we have L(t) = x2 (t) − x1 (t). The corresponding SSR for the spring deformation is then: δ = L − ℓ0 = x2 (t) − x1 (t) − ℓ0 Thus, once expanded, our spring force will be written: 1 (x2 − x1 − ℓ0 ) c Now, we draw the free body diagrams of masses m1 and m2 as per Figure 2: Fs =

x1 (t) m1

x2 (t)

F~s

F~s

(a)

m2

(b)

Figure 2: Free-Body Diagrams for (a) mass m1 and (b) mass m2 . Note that the direction of motion for each mass has been indicated. And when taking the net force in each case, we should write: Mass m1 : Mass m2 :

X

X

4

Fx1 = +Fs Fx2 = −Fs

2.3

Friction and Dampers

Friction acts to oppose the relative motion of objects against eachother. Sometimes, friction is useful — it helps us move relative to the ground. Other times, friction is an unfortunate fact of life that reduces the efficiency of our machines and introduces heat into our systems. Depending on the type of friction we are dealing with, there are different models that are commonly used. All frictional elements however have one thing in common: they remove energy from the system, converting it into non-recoverable forms such as heat, sound, etc. You may have met one friction model in PHYS1205 or PHYS1210: Ff = µN, whereby the magnitude of the friction force Ff depends on a dimensionless ‘coefficient of friction’ µ and the normal force N acting on the body in question. This is known as a Coulomb friction model, and is often used to describe the resistance experienced by bodies sliding on planes, etc. Ff x1 (t)

x1 (t)

µs Nc

m1 F~f

µk Nc m1~g N ~

(a)

(b)

N

(c)

Figure 3: According to the Coulomb Friction model, a mass sliding along a plane (a) experiences forces according to the free body diagram (b). The friction force is defined to act opposite to the direction of motion. The friction as a function of the Normal force Ff (N ) is shown in (c). Ff increases linearly with increasing N until Ff = µs Nc — the limit of static friction. After this point, the frictional force is Ff = µk Nc and is constant, the so-called Kinectic Friction. Another approach is to utilise the viscous friction model. In this case, the frictional force Ff is proportional to the relative velocity vrel of the sliding surfaces: Ff = bvrel Here, b is a viscous damping coefficient. This has units of Newton-Seconds per metre [Ns/m] and may be non-parametric — lookup tables are often used to interpolate this parameter as a function of other system variables. We will treat it as constant for most of course.

x1 (t) m1

(a)

(b)

(c)

Figure 4: According to the Viscous Friction model, a mass sliding along a plane (a) with velocity v1 (t) experiences forces according to the free body diagram (b). Note that unlike Coulomb friction, Ff (t) does not depend on the noral force N. The friction force is again defined to act opposite to the positive direction of motion. The friction as a function of the velocity of the mass Ff (v1 ) is shown in (c). Ff increases linearly with increasing velocity indefinitely under this model; Ff = bv1 . In general, it is up to you — the engineer developing the model — to decide which friction model is best suited. You should throughly research the application and come to 5

a conclusion with the support of relevant literature. While we will largely use the linear viscous friction model in this course, though this does not mean that it is well suited to your application. Finally, note that dampers are frictional components, and can more often than not be characterised by a linear viscous friction model. In this course, you should assume this is the case unless otherwise told.

Key Point: For any frictional component (including dampers), the CCRs and SSRs for linear viscous friction are as follows: CCR:

Ff = bvrel

SSR:

vrel = vf − vs

Where vf and vs are the velocities of the ‘fast’ and ‘slow’ surfaces, respectively. This CCR assumes vf > vs (keep this in mind when considering dampers adjacent to springs, etc), such that the force acts opposite to the direction of the net velocity vector (i.e. from the ‘fast’ body toward the ‘slow’ body. That is to say, the frictional force should oppose motion. For friction on a block, this is obvious. For a damper, you should consider whether it is in ‘extension’ or ‘compression’.

6

3

Model Representations

Let’s recap: we now know what a state-space model is. We also have the ability to build this kind of model for many ‘simple’ mechanical systems when given a pictorial representation. On our journey to being well rounded modelling engineers, we’ve now met three representations of physical systems; 1. Pictorial representations (ie sketches, drawings). 2. Systems of Differential Equations. 3. State-Space Models. We’re next going to learn another representation — the Block Diagram. We will also cover how to ‘convert’ our models from one representation to another — fleshing out the dashed connections in Figure 5.

Pictures/Sketches ODE

State-Space Model

Block Diagram Figure 5: A fundamental block diagram operation.

7

4

Block Diagram Fundamentals

Simply said, Block diagrams are maps that show the flow of information in a model. Block diagrams are extremely useful tools: they provide a convenient link between other representations, reveal potential issues with our models (causality) and provide a visual representation that can make it easier to understand what is going on. Broadly speaking, a block diagram consists of lines (or arrows) called signals and operating components called blocks. Figure 6 shows a fundamental block diagram operation. Here, the signal x(t) enters a block. This block takes an input (represented by (·) — here, x(t)) and performs the function f on it. The output of this block is y(t) = f (x(t)).

Figure 6: A fundamental block diagram operation. In general, operators (blocks) are usually drawn as squares with the operation written within. For ease of reading (and familiarity with the way these diagrams are usually represented in software), we give some common operations special shaped blocks, as shown in Figure 7.

Figure 7: A fundamental block diagram operators.

From top to bottom: • A sum block takes two or more inputs, x1 and x2 and outputs the sum of these. • A gain block multiplies the input x(t) by a constant gain C and outputs this product. • An Integrator block outputs an integral of the input signal. Initial conditions (or integration limits) must be specified and passed in as additional inputs to this block. Where no initial conditions are specified, zero conditions are assumed. Perhaps the quickest way to come to understand block diagrams is by example. In generating our first diagram, we will also be fleshing out our first transformation; from state-space model to block diagram. 8

5

Transforming State-Space Models to Block Diagrams Key Point: To construct the block diagram of a state-space model, we follow a three-step procedure: 1. Draw a unique integrator block for each state. Label the output of each integrator as the state it represents zi , and the input of each integrator as the corresponding state derivative z˙i . 2. Flesh out the block diagram by interconnecting signals from the other states (applying relevant operations using blocks (e.g. sums, products, gains)) to form each state derivative. Remember; having a state-space model means that these derivatives must (by definition) be constructed as a function of the other states. 3. Finally, create a signal to represent the output and build it as a function of the states in the same manner.

For example, a state-space model of the mass-spring-damper system with a co-ordinate z1 = x(t) measured from the equilibrium position of the mass an no input force is: 1 z2 m b −1 z1 − z2 z˙2 = c m z˙1 =

First, we draw and label the integrator blocks. We require one block for each state.

Figure 8: Integrator blocks for each of the system states. Next, we interconnect the components so that the block diagram ‘reads’ the same as the state-space model. In other words, we must make sure that the inputs of each integrator block we have drawn correctly represent to the corresponding state derivative. Starting with z˙1 :

Figure 9: Interconnecting elements to satisfy the first state-space equation. This completed portion of the block diagram now says that z˙1 is composed by taking the signal z2 and applying a gain of m1 . This agrees with the state-space equation for z˙1 . Now, doing the same for the second state-space equation:

9

Figure 10: Interconnecting elements to satisfy the second state equation.

Note that here we have had to introduce a sum block immediately before the state derivative z˙2 as this derivative has two terms — a contribution from z1 (which is passed through a gain), and a contribution from z2 (which is also passed through a gain). Once we have specified all of the inputs to the integrator blocks, the diagram is complete.

6

Transforming Block Diagrams to State-Space Models Key Point: To obtain a state-space model from a block diagram, only two steps are required: 1. Designate a state for each integrator block. Label the output of each integrator as the state and the input to each integrator as the state derivative. 2. Read-off the values of each state-derivative using the block diagram by following the input signals back to their corresponding states/inputs The system of first-order differential equations obtained is the state-space model. For example, consider the following block diagram:

Note that, by an alternative notation, gains are represented by square blocks in this diagram. To obtain a state-space model from this diagram, we first label the inputs and outputs of each integrator block and define these as the states of our system. Note: these definitions are arbitrary. The ‘states’ we end up with in our model may not necessarily correspond

10

to the nice physcial quantities we previously selected (i.e. momentum and position). The model will still be perfectly valid.

Figure 11: We first label the states and state-derivatives on our diagram. Next, we begin working our way back through the model, constructing our state-space equations by reading directly from the block diagram. For example, tracing the signals leading to z˙1 gives the first state equation: z˙1 = z2

Figure 12: Tracing the signals leading to z˙1 gives the first state equation. We repeat the process for the second state equation: z˙2 = z3

11

Figure 13: Tracing the signals leading to z˙2 gives the second state equation.

And finally the same for the third (and most complicated) state-space equation:   z˙3 = b0 × u(t) − a0 z1 − a1 z2 − a2 z3

Figure 14: Tracing the signals leading to z˙3 gives the third and final state equation.

12

7

Converting ODEs to Block Diagram

It is also possible to construct block diagrams from Ordinary Differential Equations. We do this by first converting from ODE to State-Space model, then writing a block diagram for the state-space model as before.

8

Converting ODEs to State-Space Models

Converting an ODE to a state-space representation is a reasonably straightforward task. Conceptually, all we are doing is taking a single, higher-order ODE and writing it as a system of coupled, at-most first order ODEs.

Key Point: To obtain a state-space model from an ODE: 1. Identify the order of the ODE — it is the order of the highest derivative present, and it is also the number of states we require to model the system. 2. Designate one state for the output variable (the subject of the ODE), and one for each of it’s derivatives up to (but not including) the highest order one. 3. Re-arrange the ODE such that the highest order derivative is written explicity in terms of the other derivatives. 4. Write the state-space equations. Because of how we have selected the states, all but the highest derivative equation will be trivial. The highest derivative equ...


Similar Free PDFs