# 旋轉變壓器 (`resolver`)

> 輸出軸電氣角的正弦與餘弦。

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

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

**分類:** 機械 · **種類:** `{"element":"resolver","kind":"mechanical"}`

## 何時使用

用於把 sin 與 cos 角度訊號送入追蹤迴路。要直接取得角度時用位置感測器，要計數時用增量式編碼器。

## 接腳

| 接腳 | 訊號域 | 意義 |
|---|---|---|
| `shaft` | 機械 | 軸端子，讀取轉速，不加負載 |
| `sin` | 訊號 | amp 乘以電氣角的正弦 |
| `cos` | 訊號 | amp 乘以電氣角的餘弦 |

## 常用參數

- `amp`: Size of the excitation signal (預設值: 1)
- `poles`: Number of poles of the machine (預設值: 2)
- `theta0`: Shaft angle at the start (預設值: 0)

## 參數

| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 |
|---|---|---|---|---|
| `amp` | — | 1 |  | Size of the excitation signal |
| `poles` | — | 2 |  | Number of poles of the machine |
| `theta0` | rad | 0 |  | Shaft angle at the start |

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

## 模型

感測器從 theta0 開始對軸轉速積分，並形成電氣角 θe = (poles/2)·角度。輸出為 sin = amp·sin(θe) 與 cos = amp·cos(θe)，所以 sin² + cos² = amp²。這些是已解調的輸出，沒有激磁載波。感測器是理想的，沒有誤差、雜訊與延遲。

## 常見錯誤

- 輸出已經解調，所以沒有激磁載波可看或要去除。要還原角度時，請用能分辨象限的計算，因為單純把 sin 除以 cos 會丟失象限。
- poles 決定每轉有幾個電氣週期，所以有兩個極對數的雙速旋轉變壓器，poles 要填 4。它必須是偶數，奇數會被拒絕。
- amp 必須大於零，否則無法執行。它是輸出振幅，不是激磁振幅，所以要用變壓比乘以激磁振幅，而且角度從 theta0 開始，並不會跟隨馬達。

Problems 規則: `compile.error`

## 規格書與來源

amp 是輸出振幅，等於變壓比乘以激磁振幅。poles 是極對數的兩倍（速度數，一對極為 1X），theta0 是以機械弧度表示的起始角度。

## 範例

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

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