# 直流馬達 (`dc`)

> 電樞與磁場繞組分開供電的他激式直流馬達。

![dc](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/dc.svg)

[元件參考](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/) · [English](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/machines/dc/)

**分類:** 馬達 · **種類:** `{"kind":"machine","model":"dc"}`

## 何時使用

需要磁場控制、弱磁，或要做並激或串激接線時使用。磁場來自磁鐵時改用永磁直流馬達。

## 接腳

| 接腳 | 訊號域 | 意義 |
|---|---|---|
| `ap` | 電氣 | 電樞正端，電流流入產生正轉矩 |
| `an` | 電氣 | 電樞負端 |
| `fp` | 電氣 | 磁場正端，電流流入產生正向磁場 |
| `fn` | 電氣 | 磁場負端 |
| `shaft` | 機械 | 機械軸，轉速單位為 rad/s |

## 常用參數

- `ra`: Resistance of the armature winding (預設值: 0.5)
- `la`: Inductance of the armature winding (預設值: 5m)
- `laf`: Field-armature coupling; illustrative default (預設值: 1)
- `rf`: Resistance of the field winding (預設值: 100)
- `j`: How strongly the rotor resists speeding up (預設值: 0.01)

## 參數

| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 |
|---|---|---|---|---|
| `ra` | Ω | 0.5 |  | Resistance of the armature winding |
| `la` | H | 5m |  | Inductance of the armature winding |
| `rf` | Ω | 100 |  | Resistance of the field winding |
| `lf` | H | 1 |  | Inductance of the field winding |
| `laf` | H | 1 |  | Field-armature coupling; illustrative default |
| `j` | kg·m² | 0.01 |  | How strongly the rotor resists speeding up |
| `b` | N·m·s/rad | 0 |  | Friction that grows with speed |
| `w0` | rad/s | 0 |  | Shaft speed at the start |

_參數說明在兩種語言中都是英文。_

## 模型

方程式為 va = ra·ia + la·dia/dt + laf·if·ωm、vf = rf·if + lf·dif/dt 與 Te = laf·if·ia，所以 laf·if 的作用就是磁通常數 ke。模型不含電樞反應、電刷壓降、換向與磁場飽和。結果名稱為電樞的 i(M1.a)、磁場的 i(M1.f)、wm(M1) 與 Te(M1)。

## 常見錯誤

- 沒有磁場電流時，馬達既沒有轉矩也沒有反電動勢。請由 fp 與 fn 供電給磁場並等它穩定，因為預設的磁場時間常數是 10 ms。
- 靜止時直接加全電壓會產生堵轉電流，也就是電壓除以 ra，遠高於額定電流。請用截波器的電流迴路限制它。
- 轉子慣量 j 已經在軸上，再用轉動慣量元件加一次會算兩次。磁場極性反接會使轉矩與反電動勢反向。

Problems 規則: `pin.unconnected`

## 規格書與來源

ra 與 la 取電樞繞組的值，rf 與 lf 取磁場繞組的值。laf 是額定反電動勢常數（額定磁場電流下，單位 V·s/rad）除以該磁場電流，j 取規格書的值。

## 範例

以指令 `file.openExample` 開啟範例，名稱為 `demo:dc`.

---
由 `cargo xtask reference` 依使用說明文字與參數規格產生，請勿手動編輯。
