Machine sf_car

Charts shift_logic
Created By Unknown
Version none
Data Tconfirm

Target sfun

Machine sf_car
Description Default S-Function target.
Code Command sfc
Code Flags -sfun-debug-consistency-range-conflict
Make Command mex -v

Chart shift_logic

Machine sf_car

(1)
gear_selection

Data down_threshold , tdn , tup , up_threshold , throttle , vehicle_speed , gear , Tconfirm
Events DOWNSHIFT21 , DOWNSHIFT32 , DOWNSHIFT43 , UPSHIFT12 , UPSHIFT23 , UPSHIFT34
States gear_selection

State gear_selection

Parent shift_logic
Label gear_selection/

(1)
gear_state
(2)
selection_state

Substates gear_state , selection_state

State gear_state

Parent gear_selection
Label gear_state

(1)
fourth
(2)
second
(3)
third
(4)
first
(5)
T1
(6)
T2
(7)
T3
(8)
T5
(9)
T6
(10)
T7

Substates fourth , second , third , first

Transition T1

Parent gear_state
Label UPSHIFT34

Source third
Dest fourth
Chart shift_logic

Transition T2

Parent gear_state
Label UPSHIFT23

Source second
Dest third
Chart shift_logic

Transition T3

Parent gear_state
Label UPSHIFT12

Source first
Dest second
Chart shift_logic

Transition T5

Parent gear_state
Label DOWNSHIFT43

Source fourth
Dest third
Chart shift_logic

Transition T6

Parent gear_state
Label DOWNSHIFT32

Source third
Dest second
Chart shift_logic

Transition T7

Parent gear_state
Label DOWNSHIFT21

Source second
Dest first
Chart shift_logic

State selection_state

Parent gear_selection
Label selection_state/ during: down_threshold = ml('interp2([1:4],downth, downtab, %g, %g)', gear, throttle);... up_threshold = ml('interp2([1:4],upth, uptab, %g, %g)', gear, throttle);

(1)
upshift_confirm
(2)
steady_state
(3)
downshift_confirm
(4)
T9
(5)
T10
(6)
T11
(7)
T12
(8)
T13
(9)
T16
(10)
T17
(11)
T18
(12)
T19
(13)
T20
(14)
T21
(15)
T22

Substates upshift_confirm , steady_state , downshift_confirm

Transition T9

Parent selection_state
Label [vehicle_speed > up_threshold]

Source steady_state
Dest upshift_confirm
Chart shift_logic

Transition T10

Parent selection_state
Label [vehicle_speed < down_threshold]

Source steady_state
Dest downshift_confirm
Chart shift_logic

Transition T11

Parent selection_state
Label [vehicle_speed < up_threshold]

Source upshift_confirm
Dest steady_state
Chart shift_logic

Transition T12

Parent selection_state
Label [vehicle_speed > down_threshold]

Source downshift_confirm
Dest steady_state
Chart shift_logic

Transition T13

Parent selection_state
Label [t - tup >= Tconfirm & ... vehicle_speed >= up_threshold]

Source upshift_confirm
Dest J3
Chart shift_logic

Transition T16

Parent selection_state
Label [t - tdn >= Tconfirm & ... vehicle_speed <= down_threshold]

Source downshift_confirm
Dest J4
Chart shift_logic

Transition T17

Parent selection_state
Label [gear == 3]/UPSHIFT34

Source J3
Dest J2
Chart shift_logic

Transition T18

Parent selection_state
Label [gear ==4]/DOWNSHIFT43

Source J4
Dest J1
Chart shift_logic

Transition T19

Parent selection_state
Label [gear == 2]/UPSHIFT23

Source J3
Dest J2
Chart shift_logic

Transition T20

Parent selection_state
Label [gear == 3]/DOWNSHIFT32

Source J4
Dest J1
Chart shift_logic

Transition T21

Parent selection_state
Label [gear == 2]/DOWNSHIFT21

Source J4
Dest J1
Chart shift_logic

Transition T22

Parent selection_state
Label [gear == 1]/UPSHIFT12

Source J3
Dest J2
Chart shift_logic

Event DOWNSHIFT21

Parent shift_logic
Scope LOCAL
Trigger EITHER_EDGE

Event DOWNSHIFT32

Parent shift_logic
Scope LOCAL
Trigger EITHER_EDGE

Event DOWNSHIFT43

Parent shift_logic
Scope LOCAL
Trigger EITHER_EDGE

Event UPSHIFT12

Parent shift_logic
Scope LOCAL
Trigger EITHER_EDGE

Event UPSHIFT23

Parent shift_logic
Scope LOCAL
Trigger EITHER_EDGE

Event UPSHIFT34

Parent shift_logic
Scope LOCAL
Trigger EITHER_EDGE

Data Tconfirm

Parent sf_car
Scope WORKSPACE
Data Type double

Data Tconfirm

Parent shift_logic
Scope WORKSPACE
Data Type double

Data down_threshold

Parent shift_logic
Scope LOCAL
Data Type double

Data gear

Parent shift_logic
Scope OUTPUT
Data Type double
Units int
Range 1...4

Data tdn

Parent shift_logic
Scope LOCAL
Data Type double

Data throttle

Parent shift_logic
Scope INPUT
Data Type double
Units double

Data tup

Parent shift_logic
Scope LOCAL
Data Type double

Data up_threshold

Parent shift_logic
Scope LOCAL
Data Type double

Data vehicle_speed

Parent shift_logic
Scope INPUT
Data Type double
Units double