W A T K I N S - J O H N S O N C O M P A N Y Semiconductor

advertisement
Engr/Math/Physics 25
Chp10:
SimuLink-1
Bruce Mayer, PE
Licensed Electrical & Mechanical Engineer
BMayer@ChabotCollege.edu
Engineering/Math/Physics 25: Computational Methods
1
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Learning Goals
 Implement Mathematical Operations in
MATLAB using SimuLink
InterConnected 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
Engineering/Math/Physics 25: Computational Methods
2
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
What is SIMULINK?
 SIMULINK is a tool for modeling,
analyzing, and simulating a wide variety
of physical & mathematical systems,
including those with nonlinear elements
and those which make use of
continuous and discrete time
 Applications Can be found in Dynamic
Control Systems, Signal Processing,
Communications, and other
time-varying systems.
Engineering/Math/Physics 25: Computational Methods
3
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
More on SimuLink
 SimuLink is a Graphical Environment
where Math Operations are represented
by BLOCK Icons
• Allows for FEEDBACK of Control Vars
 Since SimuLink is used to Analyze
Dynamic (time-varying) Systems, there
are many References to the Variable, ‘s‘
• s follows from LaPlace Transforms
– Studied in 3rd year courses on Electrical, or
Dynamic Mechanical, Systems-Control
Engineering/Math/Physics 25: Computational Methods
4
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink Some More
 Since LaPlace Transforms, and
Dynamic-System Control Theory are
beyond the scope of this Class, we will
learn SimuLink by example
 The Least intuitive Concept Employed
will be FEEDBACK
The LaPlace
Transform
L f t   Fs    f t e dt
Engineering/Math/Physics 25: Computational Methods
5

 st
0
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.2 Solution (book typo)
 Use FEEDBACK to Find y(t) for ODE

y 0   5 mol

5 y  3 y  7 y  f t 
dy
 3 mol

dt t 0
sec 1  
  1    f t   3 y  7 y dt dt 
  
   
 f t   3 y  7 y dt 



5 
  
  5  

f t   3 y  7 y 1  f t   3 y  7 y 
f t   7 y

5 
y
yt 
1
1


f t 

1/5
Integ Scale

7y
3y
s
s
1st Integ
2nd Integ
3
ydot
7
Engineering/Math/Physics 25: Computational Methods y
6
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-1
dy
 10 sin t
dt
y 0   0
Fire Up Simulink
Library Browser
Engineering/Math/Physics 25: Computational Methods
7
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-2
y 0   0
dy
 10 sin t
dt
Open “Model”
Window/File
Engineering/Math/Physics 25: Computational Methods
8
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-3
dy
 10 sin t
dt
y 0   0
The “Untitled”
Model” Window
Engineering/Math/Physics 25: Computational Methods
9
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-4
dy
 10 sin t
dt
y 0   0
Select “Sources” Library
Drag SineWave icon to
Model Window
Engineering/Math/Physics 25: Computational Methods
10
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-5
dy
 10 sin t
dt
No Changes
Needed
Engineering/Math/Physics 25: Computational Methods
11
y 0   0
DoubleClick SineWave
icon to Open BlockParameters Dialog Box
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-6
dy
 10 sin t
dt
y 0   0
Select “Math Ops”
Library
Drag Gain icon to Model
Window
Engineering/Math/Physics 25: Computational Methods
12
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-7
dy
 10 sin t
dt
y 0   0
Set Gain
to 10
DoubleClick Gain icon to
Open Block-Parameters
Dialog Box
Engineering/Math/Physics 25: Computational Methods
13
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-8
dy
 10 sin t
dt
y 0   0
 Select Continous
Library
Set IC
to Zero
 Drag Integrator Block to
Model Window
 2X-Click the Icon to
Open the DiaLog Box
 Set the IC to Zero
Engineering/Math/Physics 25: Computational Methods
14
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-9
dy
 10 sin t
dt
y 0   0
 Select “Sinks”Library
 Drag Scope Block to
Model Window
Engineering/Math/Physics 25: Computational Methods
15
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-10
dy
 10 sin t
dt
y 0   0
Turns to Cross when
Clik’d
 Connect The Block
OutPuts & InPuts
Engineering/Math/Physics 25: Computational Methods
16
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-11
dy
 10 sin t
dt
y 0   0
 Open the Config
Parameters Dialog
Box
 Set 13s Stop-Time
Engineering/Math/Physics 25: Computational Methods
17
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-12
 Start Simulation
dy
 10 sin t
dt
y 0   0
 Opens the Scope
Display
 Wait for “Bell” to
Sound
 2X Click Scope
Engineering/Math/Physics 25: Computational Methods
18
 Clik Binoc’s to
AutoScale
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink-13
dy
 10 sin t
dt
 Simulation Result yt   y0 
Engineering/Math/Physics 25: Computational Methods
19

z t
z 0
y 0   0
10 sin zdz
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
EX 10.2-1 (1)
 Export Simulation to
WorkSpace for
Plotting
dy
 10 sin t
dt
y 0   0
 2X-Clik “To
WorkSpace” icon
 Add/Subtract icons
SOURCES
Library
SIGNAL
ROUTING
SINKS
Library
Engineering/Math/Physics 25: Computational Methods
20
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
EX 10.2-1 (2)
 Export Result
y 0   0
dy
 10 sin t
dt
 Plot the Result
Example 9.2-3: Soln to dy/dy = 10sin(t) • y(0) = 0
20
t
yt 
18
16
14
y
12
10
8
6
4
>> plot(y(:,1),y(:,2)),
xlabel('t'), ylabel('y'), grid
2
0
0
2
4
6
8
10
t
Engineering/Math/Physics 25: Computational Methods
21
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
12
14
EX 10.2-3 (1) (with a few mods)
 SimuLink Model for
dy
 10 y  2 sin 4t
dt
y 0   2
 Integrating, Find

y t 
2

2 sin 4 z  10 y dz
z 0
dy  
z t
 Note that the
variables are NOT
Separable
• y is on BOTH sides
Engineering/Math/Physics 25: Computational Methods
22
 Thus Simulate
y
y t 
2
 y t   2

2 sin 4 z  10 y dz
z 0

z t
 Then The Model
1
s
Sine Wave
Integrator
10
Gain
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Scope
EX 10.2-3 (2) → Model Parameters
1
s
Sine Wave
Integrator
Scope
10
Gain
Chg to 2
Engineering/Math/Physics 25: Computational Methods
23
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
10.2-3 (3) → Scope Result (IC=2)
Engineering/Math/Physics 25: Computational Methods
24
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
10.2-3 (4) → Scope Result (IC=0)
Engineering/Math/Physics 25: Computational Methods
25
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
EX 10.2-3 (5) → OutPut Summary
ODE
Parameters
Changed
1
0.5
dy
 1y  4 sin 4t
dt
0
-0.5
-1
-1.5
plot(y_of_t(:,1),
y_of_t(:,2)),grid
-2
-2.5
-3
0
2
4
6
8
10
12
14
16
18
Engineering/Math/Physics 25: Computational Methods
26
y 0  3
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
EX 10.2-3 (6) → Misc
dy
 10 y  2 sin 4t
dt
y 0   2
Engineering/Math/Physics 25: Computational Methods
27
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink
Help
Engineering/Math/Physics 25: Computational Methods
28
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink
Help 
3 Choices
Engineering/Math/Physics 25: Computational Methods
29
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Naming SimuLink Blocks
 Double-Click on the BlockName
PlaceHolder
 Type in a DESCRIPTIVE Name
Engineering/Math/Physics 25: Computational Methods
30
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt


EX 10.4-1 (1) v  80 9 cos t 100
2
 The SimuLink Model
pi/50
1
s
1
s
cos
Ang Accel
THETAtt
THETAt
Cos Fcn
 10s Simulation
Engineering/Math/Physics 25: Computational Methods
31
80/9
Gain
1
s
Vt
 100s Simulation
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Scope

Caveat: Hidden Functions
 Many math Functions do NOT have
their own block. Instead they “Hide” in a
PullDown menu in another icon.
 Examine
Some of
These.
Engineering/Math/Physics 25: Computational Methods
32
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
TRIG Function Pull Down Box
 On MATH
OPRERATIONS can
find SIN but not
COS or TAN
• They are HIDDEN in
the “TRIG” icon
which just happens
to have the label SIN
– All the other Major
Trig Function reside in
this block on a pull
Down menu
Engineering/Math/Physics 25: Computational Methods
33
 Start with
y  sin 3t 
Change to : y  cos3t 
• Change the Lower
Function to COS
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Sin to Cos by PullDown
 2X clik the “sin” icon to Reveal PullDown
Engineering/Math/Physics 25: Computational Methods
34
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Sin to Cos by PullDown
 Clik on Cos
 Run Sin & Cos
 Changes Icon to the
Cos Function
• That was easy
Engineering/Math/Physics 25: Computational Methods
35
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
All Done for Today
Running a
House
Furnace
 One THERM is a
unit of heating equal
to 100,000 BTU.
Engineering/Math/Physics 25: Computational Methods
36
AVERAGE
Nov.
RESIDENTIAL
2005
CUSTOMER
Percentage
Percentage
Change Nov. Change
Oct.
2005 from Oct. 2004 from Nov.
2005
2004
Therms of Gas
Used
46
25
84.0%
Cost of Gas
Procurement
(per therm)
$1.294 $1.231 5.1%
$0.743 74.2%
Average
Transportation
Charge (per
therm)
$0.41 $0.412 -0.3%
$0.395 4.0%
Total Rate
$1.704 $1.643 3.7%
$1.137 49.8%
Public Purpose
Program (PPP)
Surcharge
$0.041 $0.041 0.0%
$0.030 39.0%
Total Rate
(including PPP
Surcharge)
$1.746 $1.684 3.7%
$1.167 49.6%
Total Natural
Gas Bills
(including PPP
Surcharge)
$80.30 $42.10 90.7%
$53.69 49.6%
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
46
0.0%
Engr/Math/Physics 25
Appendix
f x   2 x  7 x  9 x  6
3
2
Bruce Mayer, PE
Licensed Electrical & Mechanical Engineer
BMayer@ChabotCollege.edu
Engineering/Math/Physics 25: Computational Methods
37
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Problem 10.15
 ThermoStat Control
of Bldg Temp
 The Governing ODE
dT
CR
 T  qR  Ta
dt
 Where did this Eqn
Come from?
Engineering/Math/Physics 25: Computational Methods
38
 Also Solve-For, and
Plot, T(t) for Given
Parameters
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15 (1)
 RELAY Block
• Relay  Switch
output between two
constants
• Library →
Discontinuities
 Relay Parameters
Engineering/Math/Physics 25: Computational Methods
39
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15 (2)
 T-Stat Temp Gain
• Gain  Multiply the
input by a constant
• Library → Math
Operations
 Fnce Gain
Engineering/Math/Physics 25: Computational Methods
40
 Parameter for Case-1
• For Case-2 will
change Gain to 40
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15 (3)
 Ambient
Temperature Model
• Sine Wave 
Generate a sine
wave
• Library → Sources
 The Input
Parameters for
   
Ta  50 F  10F sin  
t 

 12hr  
Bias
Amplitude
Frequency
Engineering/Math/Physics 25: Computational Methods
41
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15 (4)
 Sin Fcn Parameters
 The Summing Node
• Sum  Add or
subtract inputs
• Library → Math
Operations
Engineering/Math/Physics 25: Computational Methods
42
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15 (6)
 Sum Parameters
 COPY the R*qm
Gain Block in Model
Space and change
Parameters
 1/RC Gain Block
• 0.5 per HR
Engineering/Math/Physics 25: Computational Methods
43
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15 (7)
 Now the LaPlace
Integrator
 Integ Parameters
• Integrator  Integrate
a signal
• Library →
Continuous
Engineering/Math/Physics 25: Computational Methods
44
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15 (8)
 MUX (Many-to-One)
for Ta and T
• Mux  Combine
several input signals
into a vector or bus
output signal
 MUX Parameters for
• Library → Signal
Routing
Engineering/Math/Physics 25: Computational Methods
45
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15 (9)
 Use ToWorkSpace
to Send Ta & T to
WorkSpace for
Plotting
• To Workspace 
Write data to the
workspace
• Library → Sinks
Engineering/Math/Physics 25: Computational Methods
46
 The ToWorkSpace
Parameters
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15 (10)
 Connect the Dots
• Be sure to Include FeedBack Link to the ThermoStat
• Scope Added for Diagnostic PurposesBack Link to
the ThermoStat
Bruce Mayer, PE
Engineering/Math/Physics 25: Computational Methods
47
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15 (11)
 Compare Cases
• Small Furnace
Engineering/Math/Physics 25: Computational Methods
48
• Large Furnace
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15a (12) – Small Fnce
Prob 9.15 • Thermostatic Control - Small Furnace
75
% plot(tout, simout), xlabel('t
(Hr)'), ylabel('T (°F)'), grid
70
65
60
T (°F)
Unstable
Inside
Temp
55
50
45
40
Ambient Temp
Inside Temp
0
5
10
15
20
Engineering/Math/Physics 25: Computational Methods
49
25
t (Hr)
30
35
40
45
50
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15a (13) – Large Fnce
Scope
simout
75
Plot Ta & T(t)
Prob 9.15 • Thermostat Control - Large Furnace
T (°F)
60
0.5
STABLE
Inside
Temp
1/RC
1
s
65
Integrator
IC = 70°F
70
T-Stat
50
45
40
Ambient Temp
IInside temp
0
5
10
15
20
Engineering/Math/Physics 25: Computational Methods
50
Fnce
R*qm
Ambient
Temp, Ta
40
55
25
t (Hr)
30
35
40
45
50
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15b (14)
 Part (B) → For
Stable Temp Control
Find Energy Used
 Copy & Modify Bloks
• Gain
• Integrator
 The Modify Previous
Model
 Separate Gain Blok
R*qm to gain Access
to qm
 Scale qm to get
scale comparable to
T(t)
Engineering/Math/Physics 25: Computational Methods
51
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15b (15)
 The Energy Integrator Model
Ambient
Temp, Ta
1028
T-Stat
qm
0.5
0.0389
1/RC
R
1
s
simout
Integrator
IC = 70°F
Plot Ta & T(t)
1/100
Scale Output
Engineering/Math/Physics 25: Computational Methods
52
1
s
DeBug
Scope
Total
Energy
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.15b (16) – Energy Use
Prob 9.15b • Total Energy Used - Large Furnace
140
Inside Temp
Furnace Energy Use
120
T (°F), E/100 (BTU/Hr)
100
80
60
40
Daily Use = 12400 BTU/Day =
0.124 Therm/Day → 21.7 ¢/Day
20
But This Fnce is Microscopic; My
Fnce rating is 80 kBTU/Hr
0
0
5
10
Engineering/Math/Physics 25: Computational Methods
53
15
t (Hr)
20
25
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
10.2
Engineering/Math/Physics 25: Computational Methods
54
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
10.2
Engineering/Math/Physics 25: Computational Methods
55
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
10.2
Engineering/Math/Physics 25: Computational Methods
56
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Prob 10.2
Engineering/Math/Physics 25: Computational Methods
57
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink ↔ ODE45
Engineering/Math/Physics 25: Computational Methods
58
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Engineering/Math/Physics 25: Computational Methods
59
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
SimuLink ↔ ODE45
Engineering/Math/Physics 25: Computational Methods
60
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Problem 10.2-1
Engineering/Math/Physics 25: Computational Methods
61
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Problem 10.2-1
Engineering/Math/Physics 25: Computational Methods
62
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Problem 10.2-1
Engineering/Math/Physics 25: Computational Methods
63
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
6
Clock
5
-1/20
eu
Product
Math
Function
1
s
1
s
To yDot
IC = 2
To y
IC = 5
1/5
13
Gain
Gain3
y(t)
Constant
3
Bruce Mayer, PE
ENGR25 * 30Apr13
4
yoft
Gain2
To Workspace
7
Gain1
y(t)
3
2
1
5 y  3 y  7 y  13e
0
-1
0
2
4
6
Engineering/Math/Physics 25: Computational Methods
64
8
10
t
12
14
16
 t 20
18
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
20
P10.2 with various forcing fcns
Forcing fcns : f t 
50 sin 4.3t   7.7
t
Engineering/Math/Physics 25: Computational Methods
65
1
13e t 20
t 7
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
mck Exmpl (1)
 2X Mass, Spring,
Damper System
 How Do x1 & x2
respond to the
SUDDEN
Application of a
UNIT Pull
(1lb or 1N)?
x1
x2
C1
k1
C2
k2
f
(Pull Force)
Engineering/Math/Physics 25: Computational Methods
66
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
EX mck (2)
 m1 = 5
 m2 = 3
x1
 c1 = 4
C1
k1
 c2 = 8
 k1 = 1
 k2 = 2
x2
C2
k2
f
(Pull Force)
Engineering/Math/Physics 25: Computational Methods
67
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
EX mck (3)
 2X Mass, Spring,
Damper System
 Set Simulation Time
and check by 2X
click Scope
Engineering/Math/Physics 25: Computational Methods
68
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
EX mck (4)
 Simulation
Time = 10s
 Positions have NOT
Yet Stabilized
 Auto Scaling the
Axes
Engineering/Math/Physics 25: Computational Methods
69
• Try 100s StopTime
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
EX mck (5)
 StopTime = 100s
 Stabilizes after
about 25s
• Use 25s for Stop
Engineering/Math/Physics 25: Computational Methods
70
 Final Offsets
• x1 = 1.0
• x2 = 1.25
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
P10.2 with various forcing fcns
Forcing fcns : f t 
t
50 sin 4.3t   7.7
Engineering/Math/Physics 25: Computational Methods
71
13e
t 20
Bruce Mayer, PE
BMayer@ChabotCollege.edu • ENGR-25_Lec-25_SimuLink-1.ppt
Download