Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1...

32
Vorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Transcript of Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1...

Page 1: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Vorlesung AFS, 06.06.2007 1

Erstellung von SimulationsmodellenIn MATLAB/Simulink

Christian Müller

Page 2: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Letzte Woche: Auslegung der Klimaanlage durch stationäreGleichungen ⇔ Berechnung des Gleichgewichtszustand

Diese Woche: Auslegung der Klimaanlage durch dynamische Simulationen

• Interaktion zwischen den einzelnen Komponenten.

• Wie lange dauert es bis das Gleichgewicht erreicht wird?

Klimaanlage ⇔ Temperaturregelung (Dynamisch)

Page 3: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Der Reglerw: Sollwerte: Regeldifferenzu: Stellgrößed: Störgrößey: RegelgrößeRückkopplung

Page 4: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Klimaanlage ⇔ Luftverteilungssystem

Ergänzung
N2 : Stickstoff O2 : Sauerstoff
Page 5: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Beschreibung von Luft/Gassystemen

Luft ⇔ GasgemischZustandsgrößen:

Druck: p(t)Temperatur: T(t)Dichte: ρ(t)

Charakterisierung Gasgemisch:

Spezifische Gaskonstante: R(t)Spezifische Wärmekapazitäten: cp(t), cv(t)

)t(T)t(R)t(p ρ=Ideale Gasgleichung:

Page 6: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Charakterisierung Gasgemisch:

Spezifische Gaskonstante: R(t)

Spezifische Wärmekapazitäten: cp(t), cv(t)

)t()t()t(R)t(R)t(R)t()t(R

321

332211

ρ

ρ

ρ

ρρρ++++

=

)t()t()t(c)t(c)t(c)t(

)t(c321

3p3

2p2

1p1

p ρ

ρ

ρρ

ρ

ρ

++

++=

Page 7: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Standard Gasgemisch

KkgJR /287=Trockene Luft:

Kkg/J1004cp =

Kkg/J717Rcc pv =−=

Realität: In der Luft befindet sich CO2 und Wasserdampf

Page 8: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Standard Einheiten

Es ist notwendig mit einem standardisierten Einheitensystem zu arbeiten (SI: Système international d'unités )

Länge L: [m]Fläche A: [m²]Volumen V: [m³]Masse m: [kg]Zeit t: [s]Kraft F: [N]=kg m/s²Druck p: [Pa]=kg/m s²Energie, Arbeit E,W: [J]=kg m²/s²Temperatur T: [K]=°C+273.15

z.B.: spezifische Wärmekapazität c: [J/kg K]

Page 9: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Dynamische Simulation mit Simulink

Die einzelnen Blöcke sind untereinander rückgekoppelt.

Der innere Aufbau eines Blocks:

Page 10: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller
Page 11: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Standard Simulink Blöcke

Konstantenblock:

Gain:

Integrator:

Page 12: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

1. Modell

Page 13: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

1. Modell

beschreibt ein System mit: p(t)=ρ(t)=Const

Differentialgleichung:

[ ]cabinpout,dotinpin,dotdotpcabin

TcmTcmQcm

1dt

)t(dT−+=

Page 14: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

[ ]cabinpout,dotinpin,dotdotpcabin

TcmTcmQcm

1dt

)t(dT−+=

Die zugrunde liegende Differentialgleichung:

Eingehende Massenfluß: mdot,in

Temperatur des eingehenden Massenfluß: TinAusgehender Massenfluß: mdot,out=mdot,in=mdot

Gültig für ein System: p(t)=ρ(t)=Const

Differentialgleichung für ein einfaches Kabinenmodell

Page 15: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Definition der Parameter

Qdot,amb-cabin: Q_dot_amb_cabin=9500WQdot,cargo-cabin: Q_dot_amb_cabin=900W Qdot,elec: Q_dot_elec=10000WQdot,pax: Q_dot_pax=22000W Qdot,sun: Q_dot_sun=7200W

V: V=670m³mdot: m_dot=2kg/smcabin: m_cabin=759.88kg

cp: c_p=1004J/kg KR: R=287J/kg KStartwert Tcabin: T_cabin_initial=38°C=311.15K

Zustand: Das Flugzeug befindet sich am Boden. Die Außentemperatur beträgt 38°C. Flugzeug soll auf 24°C abgekühlt werden.

Page 16: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Herleitung der Differentialgleichung

Ideale Gasgleichung: )t(T)t(R)t(p ρ=

Differentielle Form:dt

)t(dT)t(R)t(Tdt

)t(dRdt

)t(dp ρρ+=

Massenbilanz: out,dotin,dotdot mmmdt

)t(dVdt

)t(dm−==

ρ

Page 17: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Energiegleichung: V)t(p)t(U)t(H +=

Enthalpie = Innere Energie + Volumenarbeit

Differentielle Form: Vdt

)t(dpdt

)t(dUdt

)t(dH+=

Die Enthalpie (Gesamtenergie) lässt sich schreiben als:)t(Tc)t(m)t(H p=

Vdt

)t(dpdt

)t(dUdt

)t(dTc)t(m)t(Tcdt

)t(dmpp +=+⇒

Page 18: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

2. Modell: Idealisierte Kabine

Beschreibt ein System mit: p(t)=Const (isobar)

Berechnung ausgehender Massenstrom:

dt)t(dT

)t(T)t(mmm

dt)t(dm

out,dotin,dot −=−=⇒Tc

TcmQm

p

inpin,dotdotout,dot

+=

Page 19: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

3. Modell

Gültig für ein System: p(t)=Const (isobar)

Vdt

)t(dpdt

)t(dUdt

)t(dTc)t(m)t(Tcdt

)t(dm .1

0

pp321

+=+

dt)t(dT)t(R)t(T

dt)t(dR

dt)t(dp .2

0

ρρ+=

321

0dt

)t(dUdt

)t(dT)t(T)t(m

dt)t(dm

=⇒−=⇒

TcTcmQ

mp

inpin,dotdotout,dot

+=⇒

Page 20: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller
Page 21: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

4. Modell: Allgemeines Volumen (kompressibel)

Ideale Gasgleichung: )t(T)t(R)t(p ρ=

Massenbilanz: out,dotin,dot mmdt

)t(dVdt

)t(dm−==

ρ

Zustandsgrößen: p(t), ρ(t) , T(t)

Parameter: V=Const

Page 22: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

[ ])TcTc(m)TcTc(mQc)t(m

1dt

)t(dTvpout,dotvinpin,dotdot

v

−−−+=

Differentialgleichung Temperatur:

Kompressibilität

Page 23: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Herleitung der Differentialgleichung

Energiegleichung: V)t(p)t(U)t(H +=

[Enthalpie = Innere Energie + Volumenarbeit]

Differentielle Form: Vdt

)t(dpdt

)t(dUdt

)t(dH+=

Die Enthalpie (Gesamtenergie) lässt sich schreiben als:)t(Tc)t(m)t(H p=

Vdt

)t(dpdt

)t(dUdt

)t(dTc)t(m)t(Tcdt

)t(dmpp +=+⇒

TcmTcmQdt

)t(dUpout,dotinpin,dotdot −+=Änderung Innere Energie:

Page 24: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Allgemeines Volumen (kompressibel)

Vdt

)t(dpdt

)t(dUdt

)t(dTc)t(m)t(Tcdt

)t(dm .3 pp +=+

out,dotin,dotdot mmmdt

)t(dVdt

)t(dm .2 −==ρ

dt)t(dT)t(mR)t(T

dt)t(dmR

dt)t(dpV .1 +=

[ ])TcTc(m)TcTc(mQc)t(m

1dt

)t(dTvpout,dotvinpin,dotdot

v

−−−+=⇒

Page 25: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

5. Modell: Druckausgleich, Stömungswiderstand

Druckenergie ⇔ Kinetische Energie

221 v

2ppp(t) ρ∆ =−=

v: Strömungsgeschwindigkeit

vA(t)mdot ρ=

Page 26: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Strömungswiderstand

Druckenergie ⇔ Kinetische Energie2

21 v2ρ

=−= pppdyn

v: Strömungsgeschwindigkeit

v(t)dot ρAm =Berechnung Massenstrom

Page 27: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

100 101 102 103 104 105 10610-3

10-2

10-1

100

101

102

Singularität

Turbulente StrömungLaminare Strömung

log(λ

)

log(Re)

ηρ

ζ

ρρ∆

ηρ

η∆

⋅⋅=

⋅⋅+=

⋅⋅==

⋅⋅⋅

==

−−

D

p

DL

pD

ii

iGii

Init

Inito

'vRe

)(Re12)'v

2('v

'vReRe

8

)2/(v'v

1

21

00

2

11 'v001,0'v'v −− ⋅<− iii

Algorithmus

Abbruchbedingung:

Abschätzung des Startwertes (Hagen-Poiseuille)

Page 28: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Laminare Strömung

Turbulente Strömung

Widerstandsbeiwerte durch Rohreinbauten bzw. Richtungsänderungen:

Allgemeiner Strömungswiderstand

221 v

2p(t) ρζ

=−= pp

Zeta-Wert

Widerstandsbeiwerte durch Reibung:

νλ

ζ

ρζ

ζ

DvRe , (Re)

v2

)(p(t) 2

==

+=

DL

S

S

Page 29: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Allgemeiner Strömungswiderstand

)()(p(t)~

dotdot mfVf ==∆Es gilt:

4.1 , )()( 1

2

1

2

1

2

1 ==== −

v

p

cc

TT

pp κ

ρρ κ

κκ

Isentrope Zustandsgleichung:

Page 30: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Zustandsgrößen: mdot(t), ρ(t) , T(t)Parameter: Durchmesser: D

Länge: LZeta-Wert: ζ

Page 31: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Vorlesung AFS, 13.06.2007 19

LTTAQ Cond

dot21 −= λWärmeleitung:

Allgemeine Wärmewiderstände

Konvektion:( )Conv

dotConv

dotS

SConv

dotSConv

dot

QQcmdt

tdTTTAQTTAQ

2,1,

22,

2,11,

1)()''( , )'(

−=

−=−= α

α

Wärmestrahlung: )( 44 TTAQ SRad

dot −⋅⋅⋅= σ

ε

Page 32: Erstellung von Simulationsmodellen In MATLAB/ · PDF fileVorlesung AFS, 06.06.2007 1 Erstellung von Simulationsmodellen In MATLAB/Simulink Christian Müller

Wärmetauscher: Dynamisch