# et3-7: modelling ii(v) electrical, mechanical and...

61
ET3-7: Modelling II(V) Electrical, Mechanical and Thermal Systems

Post on 03-Oct-2018

230 views

Category:

## Documents

TRANSCRIPT

ET3-7: Modelling II(V)

Electrical, Mechanical and Thermal Systems

Agenda of the Day1. Resume of lesson I

2. Basic system models.

3. Models of basic electrical system elements

4. Application of Matlab/Simulink to the simulation of the behaviour of electrical dynamic systems

1.1(14)An example dynamic system

• An electrical dynamic system

• Moves the coil and cone

• A mechanical system

• Which drives the air

• A thermodynamic system

• We want a method to predict what will happen during operation

1.2(14)What do we need?

• Theory that works for many different physical processes

• Solves electrical, magnetic, mechanical and thermal problems

• Steady state characteristics;– capacity; efficiency; losses; sizing

• Transient response;– steady state errors; stability; settling time; etc.

• System behaviour during faults?• Theory must account for the past history

of the system and enable us to predict future behaviour under known applied conditions

1.3(14)Example - Concept of a

cruise control system for a car

• A cruise control system in a car comprises several sub-systems.

1.4(14)Example - Coupling between

mechanical and electrical systems

• concept of a battery powered vehicle

1.5(14)Force Balance

• The equation of motion• Various mechanical

forces oppose movement• Acceleration of the

mass• Various frictional forces• Gravity (not shown)• Wind (not shown)

F e

dx

mBx f+

mx

= ⋅ + ⋅ +eF m x B x f

1.6(14)Simple Linear Mechanical system

= + +F mx Bx f

1.7(14)Simple Rotating Mechanical system

T J B fT J B f

= + +

= + +

θ θω ω

1.8(14)More Complicated Mechanical system

• Break it down to a set of free body diagrams• Write the differential equations• And solve them (integrate them)

1.9(14)Needs a Free Body Diagram

for Each Mass

• We arrive at a set of simultaneous differential equations

1.10(14)Needs a Free Body Diagram

for Each Mass

• In this way, we arrive at a set of simultaneous differential equations

( ) ( )( ) ( ) ( )

− + − − − =

− − − − − =2 1 2 2 1 1 1 1 1

2 2 2 1 2 2 1

00a

B x x K x x Mx K xf t M x B x x K x x

1.11(14)The State-Space formulation

• Convenient to solve using Matlab/Simulink• Manipulate the differential equations

– a set of first order ordinary differential equations• Isolate the differential term• The standard form

= + + + +

= + + + +

= + + + +

= + + + +

= + + + +

1 11 1 12 2 13 3 11 1 12 2

2 21 1 22 2 23 3 21 1 22 2

3 31 1 32 2 33 3 31 1 32 2

1 11 1 12 2 13 3 11 1 12 2

2 21 1 22 2 23 3 21 1 22 2

q a q a q a q b u b uq a q a q a q b u b uq a q a q a q b u b u

y c q c q c q d u d uy c q c q c q d u d u

1.12(14)The State-Space formulation

in Matrix Form

• The standard form• In Matrix Form

⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤= +⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦⎣ ⎦⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤= +⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦

Q A Q B UY C Q D U

1.13(14) Steps When Modelling a System

• Physics and topology• Select the model

– Simplifying assumptions– Draw the Free Body Diagram(s)

• Write the equations of motion– Differential equations

• Values of system coefficients– Mass; moment of inertia; inductance;

resistance etc. • Solve the equations of motion

– Integrate them

1.14(14)Cruise Control for a Car

• So the State-Space Matrices are

⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥ ⎡ ⎤= = = =⎣ ⎦⎢ ⎥ ⎢ ⎥−⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦

0 1 0, , 1 0 , 010

A B C Dbm m

2. Basic System Models

2.1(33) System models• A system usually comprises several sub-

systems• They may be a mix of types

– Electrical– Mechanical– Thermal

• Like our cruise control system

2.2(33) A cruise control system for a car

• A cruise control system in a car comprises several sub-systems.

2.3(33) Example: A Translational Electro-mechanical Actuator

• Loudspeaker

2.4(33) Notional Model of a Loudspeaker

• Consider the electrical and mechanical sub-systems of the moving coil loudspeaker.

• The electrical and mechanical subsystems of the loudspeaker are coupled by the Lorentz force and by the back emfacting on the circuit.

• The Lorentz force caused by current flowing in the coil reacting with the magnetic field acts on the mass, causing it to move

• The motion of the coil in the magnetic field induces Faraday’s Law voltage in the coil, opposing the current

2.5(33) Model of the electrical sub-system of the loudspeaker

• Modelling the electrical sub-system uses a circuit diagram comprising:– the supply voltage source, – a resistor, – an inductor, – and a velocity dependent voltage

source.

• The resistor represents the resistance of the coil

• The inductor is the inductance of the coil.

• The velocity dependent voltage source represents the effect of the back emf. (Faraday’s Law)

2.6(33) Model of the mechanical sub-system of the loudspeaker

• Modelling the mechanical sub-system employs a free body diagram in which – a spring force, – a damping force, – An inertial force, – and the Lorentz force act on the mass.

• The Lorentz force is the current dependent actuating force.

2.7(33)Model of the electrical sub-system of the loudspeaker

• The arrow indicates the direction of positive current flow

• The the plusses and minuses indicate the direction of voltage drop.

• Kirchhoff's current law around the loop yields

i R B Le - e - e - e = 0

• The voltages are denoted by:

2.8(33) Model of the electrical sub-system of the loudspeaker

i

R

b

L

Voltage Source e (t)Resistor e = RiBack EMF e = qx'Inductor e = Li'

ie (t) - Ri - qx' - Li' = 0

2.9(33) Model of the mechanical sub-system of the loudspeaker

• Four forces act on the mass representing the voice coil and cone.

• D'Alembert's Law states that the sum of all forces acting on a body including the inertial force is equal to zero:

Spring Force kx Toward the LeftDamper Force bx' Toward the Left Inertial Force mx" Toward the LeftLorentz Force qi Toward the Right

-mx" - bx' - kx + qi = 0

2.10(33) Concept Of Transfer Function

• The transfer function is an alternative model to the State Space formulation

• It takes a single input and yields a single output

• It is useful because there are techniques to analyse system performance

• These techniques are very useful for system design

2.11(33) Transfer function• The equation of motion of the free body

diagram and the voltage equation of the electric circuit are in the time domain.

• Together, these determine the transfer function of the electromechanical system from the voltage input to the displacement output.

2.12(33) The Time Domain Differential Equations are:

i

-mx" - bx' - kx + qi = 0e (t) - Ri - qx' - Li' = 0

2.13(33) The Laplace Transform relations for a variable and its first and second derivatives are as follows:

( ){ } ( )

( ){ } ( ) ( )

( ){ } ( ) ( ) ( )

x t X s

x t sX s x

x t s X s sx x

'

'' 2 '

0

0 0

=

= −

= − −

L

L

L

The initial conditions are assumed to be zero

x(0) = 0, x'(0) = 0

2.14(33) Laplace Transform of Equations of Motion

( ) ( ) ( ) ( )( ) ( ) ( ) ( )i

ms X s bsX s kX s qI sE s RI s qsX s LsI s

2 00

− − − + =

− − − =

or

( ) ( )

( ) [ ] ( ) ( )i

ms bs k X s qI sE s Ls R I s qsX s

2 0

0

⎡ ⎤− − − + =⎣ ⎦− + − =

2.15(33) The transfer function is the ratio of the Laplace transform of the output to

the Laplace transform of the input

( ) itf X s E s/ ( )=

We need to eliminate I(s)

( ) ( )I s ms bs k X sq

21 ⎡ ⎤= + +⎣ ⎦

2.16(33) The transfer function is the ratio of the Laplace transform of the output to

the Laplace transform of the input

[ ] ( )

( )[ ]

i

i

E s Ls R ms bs k qs X sq

X s qE s Ls R ms bs k q s

2

2 2

1( )

( )

⎡ ⎤⎡ ⎤− + + + −⎢ ⎥⎣ ⎦

⎣ ⎦→

=⎡ ⎤+ + + −⎣ ⎦

Substituting to eliminate I(s)

2.17(33) To write a Matlab script for the transfer function

>> R = 5; L = 5e-5; k = 2e5; b = 50; m = 4e-3; q = pi;

>> s = tf('s');

>> electromech_tf = q/((L*s+R)*(m*s^2+b*s+k)-q^2*s)

Transfer function:3.142-----------------------------------------2e-007 s^3 + 0.0225 s^2 + 250.1 s + 1e006

>> bode(electromech_tf); grid>> impulse(electromech_tf);grid>> step(electromech_tf);grid

DEMO00.m

2.18(33) Transfer function is a model limited to the relationship between a

single input and a single output

• We may require to know the transient behaviour of the current variable as well

• The State Space formulation can help us here

• We can make a model with several inputs and several outputs

2.19(33) The state-space formulation

x' = A x + B uy = C x + D u

• y is the output and x is the state variable• Both x and y may be a vector• In the case of vector variables, ABCD become vectors or matrices

2.20(33) Steps required to determine the state-space model

• Identify the energy storage elements

• Select the state variables

• Identify any trivial state equations

• Determine other necessary state equations using element laws and interconnections

• Write the model in vector-matrix form

2.21(33) Energy storage elements

• Electrical• The only electrical

element in this system that can store energy is the inductor.

2.22(33) Energy storage elements

• Mechanical

• Two mechanical elements in this system can store energy

• One is the spring

2.23(33) Energy storage elements

• Mechanical• Two mechanical

elements in this system can store energy

• The other is the mass

2.24(33) Stored Energy and State Variables

v½ mv2Mass

x½ kx2Spring

i½ Li2Inductor

State VariableEnergy StorageRelationship

Energy StorageElement

2.25(33) Selecting States

• From the table, the three candidate state variables in our system are – i, the current passing through the coil; – x, the position of the speaker diaphragm; – and v, the velocity of the speaker diaphragm.

• At this point these are only candidate state variables

• It may be necessary to define new state variables, if the derivative of the input appears in one or more of the equations.

2.26(33) Identifying Trivial State Equations

• Trivial state equations are those state equations defined by mathematics rather than physics.

• In this example there is only one trivial state equation, namely:

x v' =

2.28(33) Determining Other State Equations Using Element Laws And

Interconnections• Equations of motion• ei(t) is the input voltage

• Substitute state variables

• Manipulate to solve for derivative as a function of the states and the input

• Output equation

i

-mx" - bx' - kx + qi = 0e (t) - Ri - qx' - Li' = 0

i

-mv'- bv - kx + qi = 0e (t) - Ri - qv - Li' = 0

[ ]

( )[ ]i

1v'= bv kx qim1i'= e t Ri qvL

− − +

− −

y x=

2.29(33) Manipulate the Equations of Motion

• Manipluate the equations to give the first derivatives as a function of the states and the inputs

• This is a form suitable for numerical integration• Include the trivial state equations if you need them

i

x'= vqk bv' = - x - v + i

m m mq R e (t)i' = - v - i + L L L

2.30(33)Towards Matrix Forma) Define the State Vector

i

x'= vqk bv' = - x - v + i

m m mq R e (t)i' = - v - i + L L L

x' = A x + B uy = C x + D u

⎡ ⎤⎡ ⎤⎢ ⎥⎢ ⎥= ∧ = ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦ ⎣ ⎦

'' '

'

x xx v x v

i i

2.31(33) Towards Matrix Forma) Define the Input Vector

i

x'= vqk bv' = - x - v + i

m m mq R e (t)i' = - v - i + L L L

x' = A x + B uy = C x + D u

⎡ ⎤⎢ ⎥= ⎢ ⎥⎢ ⎥⎣ ⎦

00i

ue

2.32(33) Towards Matrix Forma) Define the Coefficient Matrices

i

x'= vqk bv' = - x - v + i

m m mq R e (t)i' = - v - i + L L L

x' = A x + B uy = C x + D u

⎡ ⎤⎢ ⎥⎢ ⎥− −⎢ ⎥= ∧ = ⎡ ⎤⎣ ⎦⎢ ⎥⎢ ⎥− −⎢ ⎥⎢ ⎥⎣ ⎦

= ∧ =⎡ ⎤ ⎡ ⎤⎣ ⎦ ⎣ ⎦

0 1 0

0 0 1

0

1 0 0 0 0 0

qk bA Bm m m

q RL L

C D

2.33(33) The Finished Matrix Form

i

x'= vqk bv' = - x - v + i

m m mq R e (t)i' = - v - i + L L L

x' = A x + B uy = C x + D u

( )

( )

⎡ ⎤⎢ ⎥

⎡ ⎤ ⎡ ⎤⎢ ⎥− − ⎢ ⎥ ⎢ ⎥⎢ ⎥= + ⎡ ⎤⎣ ⎦⎢ ⎥ ⎢ ⎥⎢ ⎥

⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎣ ⎦ ⎣ ⎦− −⎢ ⎥⎢ ⎥⎣ ⎦

⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥= +⎡ ⎤ ⎡ ⎤⎣ ⎦ ⎣ ⎦⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦

0 1 0 0' 0 0 1 0

0

01 0 0 0 0 0 0

i

i

xqk bx v

m m m i e tq RL L

xy v

i e t

3. Models of basic electrical system elementsFrequency response,

impulse/step response, working with Matlab.

3.1(3)Frequency response• Consider an RL circuit

supplied with an alternating voltage

• V is the input quantity• I is the output quantity• If f is variable, I

becomes I(f)• The circuit response to

a pure sinusoidal signal is governed by the transfer function

v f

IR

LeAC

3.2(3) Example of Frequency response

• RLC filter• Kirchhoff’s laws• 2nd order equation• Apply Laplace

transform• transform the

differential equation to an algebraic equation

• This is an initial value problem

E i

iR L

E oC

E iR L didt C

i dt

EC

i dt

i

o

= + +

=

zz

1

1

3.3 (3) Transfer function for an RLC filter

E iR L didt C

i dt EC

i dt

E s I s R sLsC

E s I ssC

E sE s

I ssC

I s R sLsC

E sE s s LC sCR

i o

i o

o

i

o

i

= + + ∩ =

= + +FHG

IKJ ∩ = F

HGIKJ

FHGIKJ =

FHGIKJ

+ +FHG

IKJ

FHGIKJ = + +

z z1 1

1 1

1

1

112

a f a f a f a f

a fa f

a f

a f

( )

( )

4.Application of Matlab/ Simulink to the simulation of the behaviour of electrical

dynamic systems

4.1(5) The equation of motion• Bridged Tee circuit• Node 4 is the

voltage reference

( )

1

2 31 2 21

1 2

3 13 22

2

1

2

0

3

0

i

nodev vnode

v vv v dvCR R dt

noded v vv v C

R dt

=

−−− + + =

−−+ =

4.2(5) Use of MATLAB function ss• Use of the Matlab function ss

– Creates a Matlab system object from the A,B,C,D matrices

– The response of the system may then be analysed in several ways

– We need to select the State Variables and create the ABCD Matrices

– State variables are usually related to the energy stored in system elements

– Here the energy storing elements are the two capacitances

4.3(5) Selection of State Variables

• The stored energy is given by:

• This leads us to select the voltage across each capacitor as state variables

2½CW Cv=

4.4(5) We need first order differential equations in these

• How do they look?

11 2

1 1 2 1 2 1 1 2

2 1 2

2 2 2 2 2 2

1 1 1 1 1 1 1 1CC C i

C C C i

dv v v vdt C R R C R C R R

dv v v vdt C R C R C R

⎛ ⎞ ⎛ ⎞ ⎛ ⎞= − + − + +⎜ ⎟ ⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟ ⎜ ⎟

⎝ ⎠ ⎝ ⎠ ⎝ ⎠

= − − +

4.5(5) In Matrix form

1 1 2 1 2

2 2 2 2

1 1 2

2 2

1 1 1 1 1

1 1

1 1 1

1

C R R C RA

C R C R

C R RB

C R

⎡ ⎤⎛ ⎞ ⎛ ⎞− + −⎢ ⎥⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟⎢ ⎥⎝ ⎠ ⎝ ⎠= ⎢ ⎥⎢ ⎥− −⎢ ⎥⎣ ⎦

⎡ ⎤⎛ ⎞+⎢ ⎥⎜ ⎟⎜ ⎟⎢ ⎥⎝ ⎠= ⎢ ⎥

⎢ ⎥⎢ ⎥⎣ ⎦

Exercises

• Using. Matlab construct a bode plot for this Bridged Tee Circuit.

Exercises

• Lit.[1]– Problem 6.1– Problem 6.3

• In each case writ a Matlab script to find the output as a function of the applied frequency and plot a Bode plot of the output.