5.5.28 · D4 · HinglishEmbedded Systems & Real-Time Software

ExercisesMIL-STD-1553 — military avionics bus

2,719 words12 min read↑ Read in English

5.5.28 · D4 · Coding › Embedded Systems & Real-Time Software › MIL-STD-1553 — military avionics bus

Shuru karne se pehle, teen numbers jo hum bar bar use karenge. Ye seedha standard se aate hain aur hum inhe kabhi silently assume nahi karenge:


Level 1 — Recognition

Exercise 1.1 — Node ko naam do

Bus pe ek radar box tab hi transmit karta hai jab Bus Controller use command karta hai. Yeh kabhi apne aap conversation start nahi karta. Yeh kaunsa node type hai, aur yeh pehle kyun nahi bol sakta?

Recall Solution

Yeh ek Remote Terminal (RT) hai. 1553 mein exactly ek Bus Controller (BC) hota hai aur woh bus time ka har microsecond apne paas rakhta hai. Ek RT ek slave hai: yeh sirf usi command word ke response mein transmit karta hai jo usse address ki gayi ho. Pehle bolne ka matlab hoga do devices ek saath baat kar rahe hain — ek collision — jo command/response design construction se hi forbid karta hai.

Exercise 1.2 — Command word fields padho

Ek command word mein hai RT Addr = 7, T/R = 1, Subaddr = 2, Word Count = 4. Simple English mein, BC kya maang raha hai?

Recall Solution
  • RT Addr = 7 → device number 7 ko address karo.
  • T/R = 1Transmit: RT ko data bhejna chahiye (1 = transmit, 0 = receive).
  • Subaddr = 2 → apne sub-channel 2 se.
  • Word Count = 4 → 4 data words bhejo.

Simple English: "RT #7, mujhe apne subaddress 2 se 4 words bhejo."

Exercise 1.3 — Konsa encoding, aur kyun

Bus har bit ke middle mein ek voltage transition guarantee karta hai. Is encoding ka naam batao aur woh ek problem bolo jo yeh solve karta hai.

Recall Solution

Yeh Manchester II encoding hai. Jo problem yeh solve karta hai woh hai receiver clock drift: identical bits ki lambi run (jaise 100 zeros) plain NRZ mein koi edges nahi deti, toh receiver yeh track kho deta hai ki bits kahan shuru hoti hain. Har pe guaranteed mid-bit edge PLL ko locked rehne deta hai. (Dekho Manchester Encoding.)


Level 2 — Application

Exercise 2.1 — Ek word ka time nikalo

Ek single 1553 word bus pe kitne microseconds occupy karta hai? Arithmetic dikhao.

Recall Solution

Ek word = . Yeh har timing calculation ka atom hai.

Exercise 2.2 — Ek poori BC-reads-RT transaction ka time nikalo

BC ek RT se 8 data words read karta hai. Sequence hai: command word, ek response gap, RT ka status word, phir 8 data words back-to-back. response gap use karo. Total transaction time compute karo. Timeline figure dekho.

Figure — MIL-STD-1553 — military avionics bus
Recall Solution

Timeline pe har word aur gap gino (red bracket = total):

Total = ====.

(Parent note ne gap use karke nikala tha; minimum gap ke saath hum paate hain. Formula identical hai — sirf gap value badi.)

Exercise 2.3 — Bus utilisation

Wahi 8-word radar read 50 times per second hoti hai (50 Hz update). Bus ka kitna fraction time yeh use karta hai? Percentage mein do.

Recall Solution

Time used per second: Ek second ka hai, isliye: Bus lagbhag 1% busy hai. Bahut jagah baaki hai — exactly isliye 1 Mbit/s chhote messages ke liye kaafi hai.


Level 3 — Analysis

Exercise 3.1 — Manchester sync detection

Sync field ka ek single level hota hai, jo Manchester data ke roop mein invalid hai. Max-no-edge rule use karke explain karo ki real data ke andar kabhi kyun appear nahi ho sakta — aur yeh sync ko unambiguous kyun banata hai.

Recall Solution

Manchester II mein har bit mein ek mid-bit edge hoti hai, isliye bina transition ke sabse lamba stretch ek edge se pehle half bit plus agli ke baad half bit hota hai — worst-case adjacent bits mein forced edges ke beech zyada se zyada ek full bit-time, yaani same level ke . Ek sync poore ke liye ek level hold karta hai, jo us limit se zyada hai. Kyunki data ka flat level produce nahi kar sakta, receiver isse guaranteed word boundary treat karta hai — koi data pattern kabhi ise imitate nahi kar sakta.

Exercise 3.2 — Dual-bus failure probability

Har bus independently per flight hour probability se fail hoti hai. Single bus vs dual-redundant buses ke liye comm-loss probability compare karo, aur improvement factor batao.

Recall Solution
  • Single bus: (0.2% per hour).
  • Dual redundant: comm tab hi lost hoti hai jab dono fail hoon: Improvement factor: Dual redundancy 500× safer hai yahan. (Independence key assumption hai — shrapnel dono wires ko saath kaatne se yeh violate hoga, isliye dono buses physically alag route ki jaati hain.)

Exercise 3.3 — Differential noise rejection

Wire A carry karta hai, wire B carry karta hai. Engine-ignition noise ka ek burst dono wires pe equally add karta hai. Receiver jo differential voltage dekhta hai woh compute karo, aur explain karo ki noise kyun gaayab ho gayi.

Recall Solution

Noise dono terms mein appear hoti hai aur subtract ho jaati hai. Receiver phir bhi (ek clean logic 1) read karta hai. Yeh common-mode rejection hai: noise jo dono wires pe equally hit kare woh difference mein cancel ho jaati hai. (Wohi principle jaise RS-485 Protocol.)


Level 4 — Synthesis

Exercise 4.1 — Ek minor-frame schedule design karo

Tumhe ek bus pe teen RTs poll karne hain:

  • RT-1: read 4 words @ 100 Hz
  • RT-2: read 16 words @ 50 Hz
  • RT-3: write 2 words @ 25 Hz

response gap use karo aur writes ke liye skeleton command + gap + N·data + status (BC data bhejta hai, RT status ke saath reply karta hai). "Minor frame" ek repeating time slot hai; sabse chhoti minor-frame period choose karo jo sabhi rates ko divide kare. (a) Minor-frame period batao. (b) Har transaction ki length compute karo. (c) Worst-case bus utilisation do.

Recall Solution

(a) Minor frame. Sabse fast rate 100 Hz hai, isliye base period hai. Har frame mein: RT-1 har frame mein chalta hai, RT-2 har 2nd frame mein (50 Hz), RT-3 har 4th frame mein (25 Hz). Minor frame = ====.

(b) Transaction lengths (read = cmd + gap + status + N·data; write = cmd + gap + N·data + status; dono mein data ke aage 2 words ki overhead plus ek gap hai):

  • RT-1 read, 4 words: .
  • RT-2 read, 16 words: .
  • RT-3 write, 2 words: .

(c) Worst-case frame. Sabse busy frame woh hai jahan teeno ek saath aate hain (har 4th frame, kyunki RT-3 sabse slow hai). Us frame mein hai: Worst frame mein utilisation: Worst-case bus load = 5.72%. Comfortably schedulable hai (dekho Real-Time Scheduling Theory aur Time-Triggered Architectures).

Exercise 4.2 — Retry budget

Ek message lamba hai. Ek bad word pe BC poora message retry karta hai, 3 total attempts tak. Ek hi message worst case mein BC ke give up karne se pehle kitna time consume kar sakta hai?

Recall Solution

Worst case = teeno attempts hote hain (2 fail, 3rd bhi fail ho sakta hai give up se pehle): Worst-case = ====. Ek scheduler ko yeh maximum budget karna chahiye, nominal nahi, warna ek noisy burst frame blow kar dega.


Level 5 — Mastery

Exercise 5.1 — Bus choose karo, defend karo

Ek engineer propose karta hai ki 1553 flight-control link ko gigabit Ethernet se replace karo "kyunki yeh 1000× faster hai." Control loop ko ek guaranteed sensor-to-actuator latency se kam chahiye. Ek decisive reason batao kyun Ethernet yeh requirement fail karta hai, aur batao ki modern avionics high-bandwidth (non-critical) traffic ke liye actually kya use karti hai.

Recall Solution

Decisive reason: raw speed irrelevant hai agar latency non-deterministic ho. Standard Ethernet (CSMA/CD, switch buffering) ek bounded worst-case delay guarantee nahi kar sakta — collisions aur queueing unpredictable jitter add karte hain, isliye tum bound prove nahi kar sakte. 1553 ka command/response schedule latency ko microsecond tak provable banata hai. Modern high-bandwidth choice: AFDX (Avionics Full-Duplex Switched Ethernet), jo latency bound karne ke liye bandwidth reservation add karta hai — bulk sensor data ke liye use hota hai jabki 1553 critical control loops pe rehta hai. Contrast karo CAN Bus aur ARINC 429 se bhi, jo alag determinism trade-offs rakhte hain.

Exercise 5.2 — Certification-driven trade-off

Dual-redundant 1553 ~99.9999% availability tak pohonchti hai, jo DO-178C Certification Level A ke liye kaafi hai. Standard do buses pe kyun rukta hai teen ki jagah? Reliability numbers se argue karo.

Recall Solution

Ek se do buses jaane se comm-loss probability se tak cut hoti hai — ek bada, sasta win. Do se teen jaane se yeh tak aur cut hoti hai, lekin already tiny hone ke saath (maan lo ), already Level A ki requirement clear kar deta hai. Teesri bus se tak improve karti hai — mission se zyada reliability, extra weight, wiring, transceivers, aur validation effort ki cost pe. Avionics mein, weight fuel hai aur cost schedule hai; tum exactly utni reliability khareedete ho jitni certification demand karti hai aur kuch nahi. Yeh diminishing returns meeting a fixed requirement hai.

Exercise 5.3 — Design closure

Sab kuch combine karo: 4.1 ki apni bus pe, ek fourth device RT-4 ko 32 words @ 100 Hz read karna hai (har frame). gaps use karo, (a) RT-4 ka transaction time compute karo, (b) busiest-frame utilisation recompute karo, aur (c) batao ki bus abhi bhi schedulable hai ya nahi (utilisation < 100%, with margin).

Recall Solution

(a) RT-4 read, 32 words (yaad raho word count 0 encode karta hai 32, maximum): (b) RT-4 har frame mein chalta hai, isliye yeh worst frame mein add hota hai (4.1 ka ): Utilisation: (c) 12.56% pe bus abhi bhi easily schedulable hai — 87% idle margin baaki hai, retries aur future growth ke liye bahut jagah. Design close ho jaata hai.