Implement Mathematical Operations - Computational Methods - Lecture Slides, Slides of Calculus for Engineers

These are the Lecture Slides of Computational Methods which includes Thévenin’s Equivalent Circuit, Circuit Simplification, Analysis of Power Transfer, Voltage Division, Analytical Game Plan, Array Operation, Element Operations, Number of Allowable Values etc.Key important points are: Implement Mathematical Operations, Simulations of Dynamic Control, Integrator Parameters, Atmospheric Pressures, Cascading Tanks, Valve Resistance, Square-Root Relation, Fluid Density, Complicated Integrand

Typology: Slides

2012/2013

Uploaded on 03/26/2013

abduu
abduu 🇮🇳

4.4

(49)

195 documents

1 / 56

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Learning Goals
Implement Mathematical Operations in
MATLAB using SimuLink Functional Blocks
Employ FeedBack in the SimuLink
Environment to numerically Solve ODEs
Create Simulations of Dynamic Control
Systems using SimuLink Block Models
Export Simulation result to MATLAB WorkSpace
for Further Analysis
Docsity.com
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

Partial preview of the text

Download Implement Mathematical Operations - Computational Methods - Lecture Slides and more Slides Calculus for Engineers in PDF only on Docsity!

Learning Goals

  • Implement Mathematical Operations in

MATLAB using SimuLink Functional Blocks

  • Employ FeedBack in the SimuLink

Environment to numerically Solve ODEs

  • Create Simulations of Dynamic Control

Systems using SimuLink Block Models

  • Export Simulation result to MATLAB WorkSpace

for Further Analysis

Problem 10.30 (1)

  • Make A subsystem

Block for

 It has been found

that for many Valves

the Flow Thru the

valve is Related to

the Pressure Drop

 Inputs

  • q (kg/s)
  • P (^) l & P (^) r (Pa)
  • R (^) l & R (^) r ([√ΔP]/[kg/s])

q ∝ Phi − Plo = ∆ P

 Using the Industry

Constant of

Proportionality, Cv

q = Cv ∆ P

Problem 10.30 (3)

  • To Account for

potential BACK Flow

under NEGATIVE ΔP

Conditions use the

Signed

Square-Root Relation;

the “SSR”

 Where the SSR Fcn

 Back to the Tank;

ID the In-Flows

Assuming Pr & Pl

are Less than Pbot

  • i.e., There is

OUTFLOW at the

Left & Right

SSR ( P )

R

q

v

If 0
If 0
P P
P P
SSR P

SSR Digression

  • The SSR fcn is BUILT into

SimuLink

  • An quick Example
    • The Result
    • For This Problem We’ll

Build our OWN

SSR

|u|

Signed Sqrt

P10_30_SSR_demo_1111.mdl

Yssr To Workspace

Yin To Workspace

Sine Wave

|u| Signed Sqrt

Scope

-10 0 1 2 3 4 5 6 7 8 9 10

0

2

4

6

8

10

t

9sin(t); SSR(10sin(t))

sint SSR

plot(tout,

(^) Yin,

(^) tout,

(^) Yssr,

(^) 'LineWidth',

(^) 3),

(^) xlabel('t'),

ylabel('9sin(t);

(^) SSR(10sin(t))'),

(^) grid,

(^) legend('sint',

(^) 'SSR')

Problem 10.30 (5)

  • Now the OutFlows in

Terms of the Fluid-

Flow Resistances

  • p ≡ Pressure at the

BOTTOM of the Tank

(Pa)

 And From Fluid

Mechanics ^ A NONlinear

ODE in h(t)

( (^) l r )

l r

l r SSR p p R

q (^) ,

,

,

1 = −

p = ρ gh

 Next, Sub into the

dmT/dt eqn

q ( q (^) l qr )

dt
dh

ρ A = − +

  

 = − − + − r r

l l

SSR p p R

SSR p p R

q dt

dh A

1 1 ρ

  

 = − − + − r r

l l

SSR gh p R

SSR gh p R

q dt

dh ρ A ρ ρ

1 1

Problem 10.30 (6)

  • Put the ODE into Integrable Form

= − − + − r r

l l

SSR gh t p R

SSR gh t p R

q dt A

dh

( )

( )

∫ ∫ (^ ( ) )^ (^ ( ) )

=

= 

z t

z r r

l l

ht

h

SSR gh z p dz R

SSR gh z p R

q A

dy 0 0

( )

∫ ∫

=

= 

z t

z r

r

l

h t l

h

dz R

gh z p

R

gh z p q A

dy 0 0

1 ρ^ ρ

 If the Pressure in the Tank is greater than

Outside the ODE simplifies to

Problem 10.30 (7)

  • Now Make a SimuLink

Model To Determine

h(t)

  • In This Case The

Parameters will be

VARIABLES with values

Taken from the

WORKSPACE

  • The Parameter List:
    • A ≡ Tank Cross- Section Area - Assumed Circular (Cylindrical Tank)
    • R (^) l,r ≡ Hydraulic

Resistances of the

LEFT & RIGHT

Valves

  • ρ ≡ Liquid Density
  • q ≡ Liquid InFlow
  • h(0) ≡ Liquid Height

at t = 0

Problem 10.30 (8)

  • Design a SimuLink Model to Solve for h(t)

Given

ql q r

( ) ( ) (^) ∫ ( ) ( )

=

= 

z t

z r r

l l

SSR gh p dz R

SSR gh p R

q A

h t h 0

( ) ( ) (^) ∫ ( ( ) ) ( ( ) )

=

= 

z t

z r r

l l

SSR p h p dz R

SSR p h p R

q A

h t h 0

q l (^) qr

Final Model

q_mi

h1, h Scope

Left P

Right P

InFlow , q

Liquid Height

Bottom P

Tank

Left P

Right P

InFlow , q

Liquid Height

Bottom P

Tank 1

f(u) SSR

0 Pr2 at Atmos

0

Pr1 at Atmos

0 Pl2 = 0

0 Pl1 = 0

1/R

Cv

Result for 1hr Simulation

Prob 10.30 (1)

  • INPORT Block for Rt &

Lt Pressure Values

  • Inport ≡ Create an

input port for a

subsystem or an external input

  • Library → Ports &

Subsystems, Sources

  • Chg Label, No

Parameters

  • Summing Bloks for Rt &

Lt ΔP’s = P-Pl,r

  • Sum ≡ Add or subtract

inputs

  • Library → Math

Operations

  • Painful RePosition of

“+” & “-” connection

Locations

  • Top Node = |-+
  • Bot Node = +-|

Prob 10.30 (2)

  • Fcn Blok for SSR
    • Fcn ≡ Apply a specified expression to the input
    • Library → User-

Defined Functions

  • Need to Implement

for u = ΔP

 Parameters for Fcn

( ) 

 

− <

= If 0

If 0

u u

u u SSR u

Prob 10.30 (4)

  • Now (^)  INport Blok for Inflow
    • Click on Block, and

Use FORMAT to Flip &

Twist Block

( (^) l r )

l r

l r SSR p p R

q (^) ,

,

,

1 = −

 Sum the OUTflow =

q l + q r

f(u) SSR

f(u) SSR

1/R_r Right R

1/R_l Left R

2 Right P

1 Left P

q l

q r

+|+

|−+

+−|

Prob 10.30 (5)

  • Then the NET INflow =

q - (ql + qr)

 Parameters for

Scaling Gain-Blok

q l

f(u) q^ r SSR

f(u) SSR

1/R_r Right R

1/R_l Left R

(^3) In

2 Right P

1 Left P q

 Now Scale Net

InFlow by 1/ρA

  • ρ & A values set in

WorkSpace

 GainBlok OutPut is

the INTEGRAND