Andrew Ford 헌정 강의: 『Modeling the Environment』 Chapter 3 - 연습 문제 10 “Joe의 소리 지표(Sound Index)로 피드백을 완성하자!”


 

1. 문제 요약

Exercise 3.10에서는 그림 3.13 모델을 완성하라는 과제입니다. Joe가 주유할 때 실제로는 계기판도, 자동 차단 펌프도 보지 않고, 들려 오는 소리를 통해 탱크가 차는 정도를 파악한다고 했습니다. 이 소리를 “Sound Index”로 정의해, 주유 유량(gas flow at nozzle)이 어떻게 달라지는지를 피드백으로 모델에 반영하라는 요구입니다.

주요 요구사항

  1. Sound Index를 3가지 값으로 정의
    • 1: “free flowing” (유량 최대)
    • 2: “some congestion” (어느 정도 줄여서 주유)
    • 5: “거의 공간 없음” (주유 중단)
  2. fullness(탱크 충만율)에 따라 Sound Index가 어떻게 변하는지 식(or 그래픽 함수)으로 연결
  3. Sound Index에 따라 노즐 유량(gas flow at nozzle)이 변하도록 설계
  4. 40초 동안 시뮬레이션 실행
  5. (1) 새로운 플로우 다이어그램, (2) 방정식 리스트, (3) Sound Index, Fullness, Gas Flow 시간 그래프 제시

2. Joe가 말한 조건 정리

  • 최대 유량: 1 gal/sec (노즐 풀 오픈)
  • 탱크 용량(capacity of the tank): 20 gal
  • 가득 참(fullness): gas in the tankcapacity\dfrac{\text{gas in the tank}}{ \text{capacity} }
  • 소리(Sound) 변화
    • 1(“free-flowing”): 대략 0% ~ 80% (or 90%) fullness 구간에서 들린다고 가정 가능
    • 2(“some congestion”): 예시로 80% ~ 90% 구간)
    • 5(“running out of space”): 90% ~ 95% 이상이 되면 Joe가 유량을 완전히 끄거나 매우 작게

문제 본문은 정확한 숫자가 약간 중복된 듯 보이지만, 대체로

  • “free-flow”는 fullness < 80% (혹은 90%),
  • “congestion”는 80%~90%,
  • “거의 공간 없음”은 90% 이상
    … 같은 방식으로 임의 설정하면 됩니다.

3. 모델에 추가할 “Sound Index” & “Flow Control” 구조

3.1 새로 들어가는 변수들

  1. Sound Index

    • 값: 1, 2, 5 (3단계)
    • 입력: fullness(%)
    • 변환 함수:SoundIndex={1 if fullness<0.802 if 0.80fullness<0.905 if fullness0.90 \text{SoundIndex} = \begin{cases} 1 & \text{ if } \text{fullness} < 0.80 \\ 2 & \text{ if } 0.80 \le \text{fullness} < 0.90 \\ 5 & \text{ if } \text{fullness} \ge 0.90 \end{cases}
  2. gas flow at nozzle

    • 값: 0 ~ 1 gal/sec
    • Sound Index에 의존(피드백)
    • 예시 규칙:gas flow at nozzle={1.0 if SoundIndex = 10.5 if SoundIndex = 20 if SoundIndex = 5 \text{gas flow at nozzle} = \begin{cases} 1.0 & \text{ if SoundIndex = 1}\\ 0.5 & \text{ if SoundIndex = 2}\\ 0 & \text{ if SoundIndex = 5} \end{cases}

3.2 플로우 다이어그램 확장

  1. gas in the tank: 저량([gal])
  2. gas flow at nozzle: 유량([gal/sec])
  3. fullness: gas in the tank20\dfrac{\text{gas in the tank}}{20} 
  4. Sound Index: converter(그래픽 함수)
  5. capacity of the tank(=20 gal): 상수 or converter
  6. feedback: Sound Index → gas flow at nozzle

4. 식(Equations) 예시

아래는 간단한 예시 방정식:

  1. gas in the tank (저량 [gal])

    d(gasInTank)dt=gas flow at nozzle
    • 초기값: 0 (거의 비어 있다고 했으므로)
  2. fullness (무단위, 0~1 범위)

    fullness=gasInTank20
  3. Sound Index (정성적 변환)

    SoundIndex={1,if fullness<0.802,if 0.80fullness<0.905,if fullness0.90 \text{SoundIndex} = \begin{cases} 1, & \text{if } \text{fullness} < 0.80 \\ 2, & \text{if } 0.80 \le \text{fullness} < 0.90 \\ 5, & \text{if } \text{fullness} \ge 0.90 \end{cases}
  4. gas flow at nozzle ([gal/sec])

    gasFlow={1.0,if SoundIndex = 10.5,if SoundIndex = 20,if SoundIndex = 5 \text{gasFlow} = \begin{cases} 1.0, & \text{if SoundIndex = 1}\\ 0.5, & \text{if SoundIndex = 2}\\ 0, & \text{if SoundIndex = 5} \end{cases} 

5. 시뮬레이션(40초)

  • 초기: gasInTank = 0, fullness=0 → SoundIndex=1 → gas flow=1 gal/sec
  • 시간이 지남에 따라 gasInTank\text{gasInTank}가 증가 → fullness가 0.8을 넘어가면 SoundIndex=2로 전환, gas flow=0.5
  • fullness가 0.9를 넘어가면 SoundIndex=5로 전환, gas flow=0 (주유 중단)

5.1 기대 결과

  • 약 16초 정도까지는 1 gal/sec로 빠르게 채워지고, (0.8×20=16gal 부근)
  • 그 후 0.5 gal/sec로 느려지며, fullness=0.9(=18gal)에 도달할 때 0 gal/sec
  • 최종 “거의 가득 찬” 상태가 되므로, 아마 20초 전후(대략 18~19초쯤) 주유가 완전 멈출 것. (정확한 수치는 시뮬레이션으로 확인)

5.2 문서화(Documentation)

  1. 새로운 플로우 다이어그램: Sound Index, gas flow at nozzle (piecewise), fullness.
  2. 방정식 리스트: 위 4개 식 + 초기 조건 + 파라미터( capacity=20, maxFlow=1 )
  3. 결과 그래프:
    • x축: 시간(0~40초)
    • y축1: fullness (0~1 범위)
    • y축2: sound index (1,2,5)
    • y축3: gas flow (0~1)

결론

Exercise 3.10의 핵심은 Joe가 소리를 통해 “탱크가 어느 정도 찼는지”를 짐작하고, 그에 맞춰 노즐 유량을 조절했다는 점을 피드백(Feedback) 구조로 모델링하는 것입니다.

  • Sound Index는 fullness에 의해 결정.
  • gas flow at nozzle는 Sound Index에 따라 달라짐.
  • 결과적으로 탱크가 꽉 차면(소리가 달라지면), 유량이 0으로 줄어듦.

이렇게 완성된 모델을 40초간 시뮬레이션하면, Joe가 실제로 탱크를 채우는 과정을 그럴싸하게 재현할 수 있습니다.











댓글

이 블로그의 인기 게시물

경연제도와 시스템사고: 세종대왕의 조세제도 개혁에서 배우는 구조적 경청의 리더십

무기력을 이기는 시스템사고 (1) — 태도와 전략 사이에서

Fishery Game과 내쉬 균형