The DC motor: back-EMF, torque and PWM speed controlมอเตอร์ไฟฟ้ากระแสตรง: แรงเคลื่อนไฟฟ้าย้อนกลับ แรงบิด และการควบคุมความเร็วด้วย PWM

Set the supply, the load and the PWM duty cycle, and watch the motor settle at the speed where back-EMF and torque balance.ตั้งแรงดันจ่าย โหลด และดิวตี้ไซเคิลของ PWM แล้วดูมอเตอร์เข้าสู่ความเร็วที่แรงเคลื่อนไฟฟ้าย้อนกลับและแรงบิดสมดุลกัน

Loading module…กำลังโหลดโมดูล…

Two equations run the motor

A DC motor has an electrical side and a mechanical side, joined by one constant K. On the electrical side, the supply drives current through the armature resistance Ra, and the spinning armature generates a back-EMF K·ω that opposes the supply. On the mechanical side, that current makes a torque K·I, which has to balance the load torque Tl plus friction B·ω.

In SI units the torque constant Kt and the back-EMF constant Ke are the same number, so the simulator uses one constant K for both.

V = I·Ra + K·ω   (armature loop)
K·I = B·ω + Tl   (torque balance)

The steady-state speed

Solve the two equations together and the speed comes out directly. The motor speeds up until its back-EMF has used up enough of the supply that the current left over makes exactly the torque the load needs. Load it more and it slows down, which lowers the back-EMF and lets more current flow to make more torque. A DC motor regulates itself this way.

ω = (V − Ra·Tl/K) / (Ra·B/K + K)
I = (B·ω + Tl) / K
rpm = ω · 60 / 2π

Power and efficiency

The supply delivers V·I. Part of it is lost as heat in the armature resistance, I²·Ra; the rest reaches the shaft as mechanical power T·ω. A heavily loaded motor draws more current, and since the loss grows with the square of the current, its efficiency falls.

P_in = V·I = P_mech + P_loss
P_mech = K·I·ω
P_loss = I²·Ra

Speed control with PWM

A microcontroller cannot output 7.2 V, but it can switch a transistor fully on and off thousands of times a second. Pulse-width modulation (PWM) does exactly that and varies the duty cycle D, the fraction of each period the switch is on. The armature inductance smooths the current, so as long as the switching is fast compared with the armature’s L/R time constant, the motor behaves as if it were fed the average voltage.

The switch is either fully on or fully off, so it wastes very little power, unlike a series resistor that drops the extra voltage as heat.

V_avg = D · Vs

Stall

At standstill there is no back-EMF, so the current is V/Ra and the torque K·V/Ra is the most the motor can make at that voltage. If the load needs more than that, the motor does not turn at all: it is stalled, drawing its full stall current and turning all of it into heat.

T_stall = K · V / Ra
stalls when K·V/Ra < Tl

Worked example (the simulator’s default values)

  1. Vs = 12 V, D = 100 %, Ra = 2 Ω, K = 0.05 V·s/rad, Tl = 0.02 N·m, B = 0.001 N·m·s/rad.
  2. ω = (12 − 2·0.02/0.05) / (2·0.001/0.05 + 0.05) = 11.2 / 0.09 = 124.4 rad/s ≈ 1188 RPM.
  3. I = (0.001·124.4 + 0.02) / 0.05 = 2.89 A. Back-EMF = 0.05·124.4 = 6.22 V and I·Ra = 5.78 V, which add up to the 12 V supply.
  4. Power: 34.7 W in, 18.0 W at the shaft and 16.7 W lost in Ra, so the efficiency is about 52 %.
  5. At D = 50 %, V_avg = 6 V: ω = 5.2 / 0.09 = 57.8 rad/s ≈ 552 RPM, and I = 1.56 A.
  6. Below D ≈ 6.7 % (V_avg = 0.8 V) the stall torque 0.05·V/2 falls under 0.02 N·m and the motor stalls.

Common mistakes

  • Expecting half the voltage to give exactly half the speed. Under load, part of the voltage always goes on I·Ra, so 50 % duty here gives 552 RPM, well under half of 1188.
  • Thinking a motor draws the most current at full speed. Current is highest at standstill, when there is no back-EMF to oppose the supply.
  • Treating PWM as a lower voltage at every instant. The armature sees the full supply during each pulse; only the average, smoothed by the inductance, is lower.

Common questions

What is back-EMF in a DC motor?

The voltage the spinning armature generates, K·ω, acting against the supply. It grows with speed, and it is what limits the current once the motor is running.

How does PWM control the speed of a DC motor?

It switches the full supply on and off quickly and varies the duty cycle D. The armature inductance smooths the pulses, so the motor runs as if it were fed D times the supply voltage.

Why does a DC motor slow down under load?

More load torque needs more current, and more current means a bigger I·Ra drop. Less voltage is left for back-EMF, so the speed, back-EMF divided by K, falls.

สองสมการที่กำหนดการทำงานของมอเตอร์

มอเตอร์ไฟตรงมีด้านไฟฟ้าและด้านกล เชื่อมกันด้วยค่าคงที่ K เพียงตัวเดียว ด้านไฟฟ้า แหล่งจ่ายดันกระแสผ่านความต้านทานอาร์เมเจอร์ Ra และอาร์เมเจอร์ที่หมุนอยู่สร้างแรงเคลื่อนไฟฟ้าย้อนกลับ K·ω ต้านแหล่งจ่าย ด้านกล กระแสนั้นสร้างแรงบิด K·I ซึ่งต้องสมดุลกับแรงบิดโหลด Tl บวกแรงเสียดทาน B·ω

ในหน่วย SI ค่าคงที่แรงบิด Kt และค่าคงที่แรงเคลื่อนไฟฟ้าย้อนกลับ Ke มีค่าเท่ากัน โปรแกรมจำลองจึงใช้ค่าคงที่ K ตัวเดียวแทนทั้งสอง

V = I·Ra + K·ω   (วงจรอาร์เมเจอร์)
K·I = B·ω + Tl   (สมดุลแรงบิด)

ความเร็วในสภาวะคงตัว

แก้สองสมการพร้อมกันจะได้ความเร็วออกมาโดยตรง มอเตอร์เร่งความเร็วขึ้นจนแรงเคลื่อนไฟฟ้าย้อนกลับใช้แรงดันจ่ายไปมากพอ จนกระแสที่เหลือสร้างแรงบิดได้พอดีกับที่โหลดต้องการ เพิ่มโหลดแล้วมอเตอร์จะช้าลง แรงเคลื่อนไฟฟ้าย้อนกลับจึงลดลง กระแสไหลได้มากขึ้นและสร้างแรงบิดมากขึ้น มอเตอร์ไฟตรงปรับตัวเองด้วยวิธีนี้

ω = (V − Ra·Tl/K) / (Ra·B/K + K)
I = (B·ω + Tl) / K
rpm = ω · 60 / 2π

กำลังและประสิทธิภาพ

แหล่งจ่ายให้กำลัง V·I ส่วนหนึ่งสูญเสียเป็นความร้อนในความต้านทานอาร์เมเจอร์ I²·Ra ที่เหลือไปถึงเพลาเป็นกำลังกล T·ω มอเตอร์ที่รับโหลดหนักดึงกระแสมากขึ้น และเพราะการสูญเสียเพิ่มตามกำลังสองของกระแส ประสิทธิภาพจึงลดลง

P_in = V·I = P_mech + P_loss
P_mech = K·I·ω
P_loss = I²·Ra

ควบคุมความเร็วด้วย PWM

ไมโครคอนโทรลเลอร์จ่ายแรงดัน 7.2 V ออกมาไม่ได้ แต่สั่งทรานซิสเตอร์ให้เปิดสุดและปิดสุดได้หลายพันครั้งต่อวินาที การมอดูเลตความกว้างพัลส์ (PWM) ทำเช่นนั้นและปรับดิวตี้ไซเคิล D คือสัดส่วนของแต่ละคาบที่สวิตช์เปิด ความเหนี่ยวนำของอาร์เมเจอร์ทำให้กระแสเรียบขึ้น ตราบใดที่การสวิตช์เร็วกว่าค่าคงที่เวลา L/R ของอาร์เมเจอร์มาก มอเตอร์จะทำงานเหมือนได้รับแรงดันเฉลี่ย

สวิตช์อยู่ในสถานะเปิดสุดหรือปิดสุดเท่านั้น จึงสูญเสียกำลังน้อยมาก ต่างจากตัวต้านทานอนุกรมที่ทิ้งแรงดันส่วนเกินเป็นความร้อน

V_avg = D · Vs

การหยุดนิ่ง (สตอล)

ขณะหยุดนิ่งไม่มีแรงเคลื่อนไฟฟ้าย้อนกลับ กระแสจึงเท่ากับ V/Ra และแรงบิด K·V/Ra คือแรงบิดสูงสุดที่มอเตอร์สร้างได้ที่แรงดันนั้น ถ้าโหลดต้องการมากกว่านี้ มอเตอร์จะไม่หมุนเลย เรียกว่าสตอล มอเตอร์ดึงกระแสสตอลเต็มที่และเปลี่ยนทั้งหมดเป็นความร้อน

T_stall = K · V / Ra
สตอลเมื่อ K·V/Ra < Tl

ตัวอย่างการคำนวณ (ค่าเริ่มต้นของโปรแกรมจำลอง)

  1. Vs = 12 V, D = 100 %, Ra = 2 Ω, K = 0.05 V·s/rad, Tl = 0.02 N·m, B = 0.001 N·m·s/rad
  2. ω = (12 − 2·0.02/0.05) / (2·0.001/0.05 + 0.05) = 11.2 / 0.09 = 124.4 rad/s ≈ 1188 RPM
  3. I = (0.001·124.4 + 0.02) / 0.05 = 2.89 A แรงเคลื่อนไฟฟ้าย้อนกลับ = 0.05·124.4 = 6.22 V และ I·Ra = 5.78 V รวมกันเท่ากับแรงดันจ่าย 12 V
  4. กำลัง: ป้อนเข้า 34.7 W ที่เพลา 18.0 W และสูญเสียใน Ra 16.7 W ประสิทธิภาพจึงประมาณ 52 %
  5. ที่ D = 50 %, V_avg = 6 V: ω = 5.2 / 0.09 = 57.8 rad/s ≈ 552 RPM และ I = 1.56 A
  6. ต่ำกว่า D ≈ 6.7 % (V_avg = 0.8 V) แรงบิดสตอล 0.05·V/2 จะน้อยกว่า 0.02 N·m และมอเตอร์สตอล

ข้อผิดพลาดที่พบบ่อย

  • คาดว่าแรงดันครึ่งหนึ่งจะได้ความเร็วครึ่งหนึ่งพอดี เมื่อมีโหลด แรงดันส่วนหนึ่งตกที่ I·Ra เสมอ ดิวตี้ 50 % ในตัวอย่างนี้จึงได้ 552 RPM น้อยกว่าครึ่งของ 1188 พอสมควร
  • คิดว่ามอเตอร์ดึงกระแสมากที่สุดตอนหมุนเร็วสุด ที่จริงกระแสสูงสุดตอนหยุดนิ่ง เพราะไม่มีแรงเคลื่อนไฟฟ้าย้อนกลับมาต้านแหล่งจ่าย
  • มอง PWM ว่าเป็นแรงดันที่ต่ำลงตลอดเวลา ที่จริงอาร์เมเจอร์ได้รับแรงดันเต็มระหว่างแต่ละพัลส์ มีเพียงค่าเฉลี่ยที่ถูกความเหนี่ยวนำทำให้เรียบเท่านั้นที่ต่ำลง

คำถามที่พบบ่อย

แรงเคลื่อนไฟฟ้าย้อนกลับในมอเตอร์ไฟตรงคืออะไร?

แรงดันที่อาร์เมเจอร์ซึ่งกำลังหมุนสร้างขึ้น คือ K·ω มีทิศต้านแหล่งจ่าย ยิ่งหมุนเร็วยิ่งมาก และเป็นตัวจำกัดกระแสเมื่อมอเตอร์หมุนแล้ว

PWM ควบคุมความเร็วมอเตอร์ไฟตรงได้อย่างไร?

สวิตช์แรงดันจ่ายเต็มเปิดปิดอย่างรวดเร็วและปรับดิวตี้ไซเคิล D ความเหนี่ยวนำของอาร์เมเจอร์ทำให้พัลส์เรียบ มอเตอร์จึงหมุนเหมือนได้รับแรงดัน D คูณแรงดันจ่าย

ทำไมมอเตอร์ไฟตรงจึงช้าลงเมื่อรับโหลด?

แรงบิดโหลดที่มากขึ้นต้องใช้กระแสมากขึ้น และกระแสที่มากขึ้นทำให้แรงดันตกที่ I·Ra มากขึ้น แรงดันที่เหลือสำหรับแรงเคลื่อนไฟฟ้าย้อนกลับจึงน้อยลง ความเร็วซึ่งเท่ากับแรงเคลื่อนไฟฟ้าย้อนกลับหารด้วย K จึงลดลง