見出し画像

Mapleで制御工学の基礎虎の巻5「むだ時間の伝達関数をパデ近似」


パデ近似をすると次式のむだ時間L[s]の伝達関数を有理伝達関数に近似することができます。有理伝達関数にすることで取り扱いが楽になったり、各種ツールでの計算を簡単にすることができるメリットがあります。

むだ時間の伝達関数

むだ時間の伝達関数を2次および3次のパデ近似したものは以下のようになります。次数はみなさんの目的に応じて適宜決めてくれたらよいと思いますが、私の経験では2次か3次で十分なことが多かったです。

むだ時間の伝達関数の2次のパデ近似
むだ時間の伝達関数の3次のパデ近似

Mapleでパデ近似してみよう

Mapleでパデ近似のコマンドを使うためには「numapprox」のライブラリを使います。「with(numapprox)」と最初に記載してライブラリを有効にしましょう。あとは次のコマンドを打つだけで簡単にパデ近似した伝達関数を得ることができます。
今回の例ではむだ時間L=1[s]のむだ時間の伝達関数exp(-1s)をパデ近似しています。「pade」関数の第1引数はパデ近似したい伝達関数を指定するので、この例では「exp(-1s)」としています。ちなみにむだ時間が1[s]ということを明示するために「1」と書いていますが、当たり前ですが「1」は省略しても何ら問題はありません。第2引数の「s」は、これが変数ということを指定しています。第3引数の[2, 2]は1つ目がパデ近似後の伝達関数の分子の次数で、2つ目が分母の次数です。むだ時間をパデ近似する際は、だいたい分母と分子は同じ次数にしています。

パデ近似のMapleコマンド

さて、2次のパデ近似をした結果を次式に示します。この記事の最初の方に示した2次のパデ近似の「L」に「1」を入れたものとちょっと式の形が違うように見えますが、「L」に「1」を入れたものです。分母と分子を「12」で割っているだけです。

exp(-1s)をMapleでの2次のパデ近似した結果

2次のパデ近似をしたむだ時間の有理伝達関数のステップ応答を図1に示します。入力に対しておおよそ1[s]のタイムラグを生じていることがわかります。
参考として図2に3次のパデ近似をした場合のステップ応答も載せておきます。

図1 exp(-1s)をMapleでの2次のパデ近似した伝達関数のステップ応答
図2 exp(-1s)をMapleでの3次のパデ近似した伝達関数のステップ応答

【English】

The Padé approximation allows the transfer function of the dead time L[s] in the following equation to be approximated by a rational transfer function. The advantage of using a rational transfer function is that it makes handling easier and simplifies calculations with various tools.

Transfer function of the dead time

Second and third-order Padé approximations of the transfer function for dead time are shown below. I am sure that you can decide the order according to your purpose, but in my experience, 2nd or 3rd order is often sufficient.

Second-order Padé approximation of the transfer function for dead time
Third-order Padé approximation of the transfer function for dead time

Let's Padé-approximate the transfer function of dead time in Maple

To use Padé approximation commands in Maple, use the “numapprox” library. To enable the library, put “with(numapprox)” on the line before the padé approximation command. Then, you can easily obtain a Pade-approximated transfer function by simply typing the following command.
In this example, the transfer function exp(-1s) of the dead time L=1[s] is Padé-approximated. The first argument of the “pade” function specifies the transfer function to be Padé-approximated, so “exp(-1s)” is used in this example. The “1” is written to indicate that the dead time is 1[s], but of course, there is no problem if the “1” is omitted. The second argument “s” specifies that this is a variable. The third argument [2, 2] is the order of the numerator of the transfer function after Padé approximation, and the second is the order of the denominator. When Padé approximating dead time, the denominator and numerator are usually of the same order.

Maple command for padé approximation

Now, the result of the second-order Padé approximation is shown in the next equation. The form of the equation looks a little different from the second-order Padé approximation shown at the beginning of this article with “1” in “L”. It is just the denominator and numerator divided by “12”.

Second-order Padé approximation of exp(-1s) in Maple

The step response of the rational transfer function for dead time with a second-order Padé approximation is shown in Figure 1. It can be seen that there is a time lag of approximately 1[s] with respect to the input. For reference, Figure 2 shows the step response for the third-order Padé approximation.

Figure 1. Step response of the transfer function with exp(-1s) as a second-order Padé approximation in Maple
Figure 2. Step response of the transfer function with exp(-1s) as a third-order Padé approximation in Maple

【Sample】

Created by Maple 2023.2


この記事が気に入ったらサポートをしてみませんか?