MENU

デジタル電流制御②

前回に続いて, 今回は電流制御の応用についての議論を行います.

デッドビート制御

f:id:Manao55:20211116214152j:plain
Dead Beat Current Control

・遅延要素

MCU内のサンプリング遅延

電流応答の遅れ(インダクタンスの要素)

少なくとも 2サンプリングは電流応答の遅れがある 

デッドビート制御の伝達関数

・2サンプリング遅延のクローズドループ伝達関数であると仮定します

{ \displaystyle
W^{*}(z) = z^{-2}
}

オープンループ伝達関数

{ \displaystyle
G^{*}(z) = G^{*}_c(z) z^{-1} \frac{T_s/L}{z-1}
}

・クローズドループ伝達関数

{ \displaystyle
W^{*}(z) = \frac{G^{*}_c(z) z^{-1}T_s}{L(z-1)+G^{*}_c(z)z^{-1}T_s} = z^{-2}
}

G^{*}_c(z) から得られる伝達関数の結果

{ \displaystyle
G^{*}_c (z) = \frac{L}{T_s} \frac{z}{z+1}
}

・極

{ \displaystyle
z = 0
}

・実装

{ \displaystyle
G^{*}_c (z) = \frac{Y^{*}(z)}{X^{*}(z)} = \frac{L}{T_s}\frac{z}{z+1}
}
{ \displaystyle
(z+1)Y^{*}(z) = \frac{L}{T_s}zX^{*}(z)
}
{ \displaystyle
Y^{*}(z) = \frac{L}{T_s}X^{*}(z)-z^{-1}Y^{*}(z)
}

・時間領域表現

{ \displaystyle
y(n)=\frac{L}{T_s}x(n)-y(n-1)
}

ブロック図

f:id:Manao55:20211117102036j:plain
Dead Beat Control

1サンプリング遅延と加算器で表現されます.

時間応答

では時間応答を見てみましょう。

"""
 time domain response of digital control
"""
import math
import matplotlib.pyplot as plt
import numpy as np
from control import tf, c2d
from control.matlab import step

### 数式     
s = tf('s')  
z = tf('z')  
L = 1        # インダクタンス
ts = 0.2     # サンプリング時間

# ゲイン
Kd = L/ts
# デッドビートコントローラ
Gz = Kd * z / (z + 1)
# オープンループ伝達関数
Goz = Gz * (1/z) * ((ts/L)/(z-1))
# クローズドループ伝達関数
Wz = Goz / (1+Goz)
print(Wz)

# 0次ホールドによる離散化
print('discrete time system (zoh) ', Wz)

### 図示
fig, ax = plt.subplots(1, 2, figsize = (6, 2.6))
# 連続時間システム
Tc = np.arange(0, 4, 0.01)
Uc = 1
y, t = step(Uc, Tc)
ax[0].plot(t, y, ls = '-')

#離散時間システム(0次ホールドによる離散化)
T = np.arange(0, 4, ts)

y, t = step(Wz, T)
ax[0].plot(t, y, ls = '-', marker = 'o', label = 'Dead Beat')


title = ['Dead Beat']
for i in range(1):
    ax[i].set_xlabel('t')
    ax[i].set_ylabel('y')
    ax[i].set_title(title[i])
    ax[i].legend()
fig.tight_layout()
plt.show()

f:id:Manao55:20211120000327j:plain
Dead Beat Control

2サンプリングで収束することがわかります。