**3. Parameters identification of the system model**

Levy's method [29] and least square estimation are widely used in system identification. Assume that the identified transfer function is given as

Assume that the identified transfer function is given as

$$\mathcal{G}\_p(\mathbf{s}) = \frac{b\_o + b\_i s + \dots + b\_n s^n}{1 + a\_i s + \dots + a\_n s^n} \tag{19}$$

where *b*<sup>0</sup> , *b*1 , ⋯, *bm*, *a*<sup>1</sup> , *a*2 , ⋯, *an* are real numbers, *m* and *n* are integers, and *m* ≤ *n*.

The frequency response is

The frequency response is 
$$G\_p(j\omega) = \frac{\left(b\_0 - b\_1\omega^2 + \cdots\right) + ja\left(b\_1 - b\_3\omega^2 + \cdots\right)}{\left(1 - a\_z\omega^2 + \cdots\right) + ja\left(a\_i - a\_y\omega^2 + \cdots\right)} = \frac{N(j\omega)}{D(j\omega)}\tag{20}$$

For each frequency point *ω<sup>i</sup>* (*i* = 1, 2, ⋯, *L*), it is assumed that the actual frequency response is Re(*ω<sup>i</sup>* ) + *j* Im(*ω<sup>i</sup>* ), and the approximation error is defined as

$$
\varepsilon \langle \text{j} \,\omega \rangle = \text{Re}\langle \omega \rangle + \text{j} \, \text{Im}\langle \omega \rangle - \frac{\text{N} \langle \text{j} \,\omega \rangle}{\text{D} \langle \text{\textdegree\downarrow} \,\omega \rangle} \tag{21}
$$

A CMAC-Based Systematic Design Approach of an Adaptive Embedded Control Force Loading… http://dx.doi.org/10.5772/intechopen.71420 263

Define an objective function:

*Ra <sup>J</sup>* \_\_\_\_*<sup>a</sup>*

where *Tm* <sup>=</sup> *Ra <sup>J</sup>* \_\_\_\_\_\_\_\_ *<sup>a</sup> Ke Kt* + *Ra Ba*

262 Adaptive Robust Control Systems

where *b*<sup>0</sup>

where *b*<sup>0</sup>

Re(*ω<sup>i</sup>*

, *b*1

) + *j* Im(*ω<sup>i</sup>*

, *b*<sup>1</sup> , *a*1 and *a*<sup>2</sup>

ficient of the motor system.

**2.5. Open-loop transfer function**

*GP*

*GP*

*GP*

, *a*2 , ⋯, *an*

, ⋯, *bm*, *a*<sup>1</sup>

The frequency response is

For each frequency point *ω<sup>i</sup>*

*ε*(*j ω<sup>i</sup>*

*GM*(*s*) <sup>=</sup> *<sup>θ</sup>m*(*s*) \_\_\_\_\_

*Kt d*2 *θ* \_\_\_\_*<sup>m</sup> dt*<sup>2</sup> <sup>+</sup> (*Ke* <sup>+</sup> *Ra B* \_\_\_\_*<sup>a</sup> Kt* ) *dθ*\_\_\_\_*<sup>m</sup>*

is the time constant of the motor system, and *Km* <sup>=</sup> *<sup>K</sup>* \_\_\_\_\_\_\_\_ *<sup>t</sup>*

The mathematical model of the open-loop plant is the cascade of the units described previously:

(*s*) = *GH*(*s*) ⋅ *GA*(*s*) ⋅ *GM*(*s*) ⋅ *GS*

Because the system bandwidth is much lower than the system sampling rate and the modulation frequency of the PWM amplifier, the time constant of the DAC converter and the amplifier is very small. In the lower frequency range, the effect of the DAC converter and the

(*s*) <sup>=</sup> *<sup>b</sup>*<sup>1</sup>

*a*2 *s* <sup>2</sup> + *a*<sup>1</sup>

Levy's method [29] and least square estimation are widely used in system identification.

(*s*) <sup>=</sup> *<sup>b</sup>*<sup>0</sup> <sup>+</sup> *<sup>b</sup>*<sup>1</sup> *<sup>s</sup>* <sup>+</sup> <sup>⋯</sup> <sup>+</sup>*bm sm* \_\_\_\_\_\_\_\_\_\_\_\_

are real numbers, *m* and *n* are integers, and *m* ≤ *n*.

(*i* = 1, 2, ⋯, *L*), it is assumed that the actual frequency response is

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ (<sup>1</sup> <sup>−</sup> *<sup>a</sup>*<sup>2</sup> *<sup>ω</sup>*<sup>2</sup> <sup>+</sup> <sup>⋯</sup>) <sup>+</sup> *<sup>j</sup>*(*a*<sup>1</sup> <sup>−</sup> *<sup>a</sup>*<sup>3</sup> *<sup>ω</sup>*<sup>2</sup> <sup>+</sup> <sup>⋯</sup>) <sup>=</sup> *<sup>N</sup>*(*j*) \_\_\_\_\_

) + *j* Im(*ω<sup>i</sup>*

) − *N*(*j ω<sup>i</sup>* ) \_\_\_\_\_ *D*(*j ω<sup>i</sup>*

*<sup>s</sup>* <sup>+</sup> *<sup>b</sup>* \_\_\_\_\_\_\_\_ <sup>0</sup>

amplifier can be omitted. Therefore, the open-loop plant can be simplified as

Obvious, it is a second-order model. Only four parameters need to be identified.

are final parameters.

**3. Parameters identification of the system model**

*GP*(*j*) <sup>=</sup> (*b*<sup>0</sup> <sup>−</sup> *<sup>b</sup>*<sup>2</sup> *<sup>ω</sup>*<sup>2</sup> <sup>+</sup> <sup>⋯</sup>) <sup>+</sup> *<sup>j</sup>*(*b*<sup>1</sup> <sup>−</sup> *<sup>b</sup>*<sup>3</sup> *<sup>ω</sup>*<sup>2</sup> <sup>+</sup> <sup>⋯</sup>)

), and the approximation error is defined as

) = Re(*ω<sup>i</sup>*

Assume that the identified transfer function is given as

*um*(*s*) <sup>=</sup> *<sup>K</sup>* \_\_\_\_\_\_ *<sup>m</sup>*

And the transfer function between the input voltage and output rotational angle is

*dt* <sup>=</sup> *um* (15)

*Tm <sup>s</sup>* <sup>2</sup> <sup>+</sup> *<sup>s</sup>* (16)

(*s*) (17)

*<sup>s</sup>* <sup>+</sup> <sup>1</sup> (18)

<sup>1</sup> <sup>+</sup> *<sup>a</sup>*<sup>1</sup> *<sup>s</sup>* <sup>+</sup> <sup>⋯</sup> *an sn* (19)

*<sup>D</sup>*(*j*) (20)

) (21)

is the gain coef-

*Ke Kt* + *Ra Ba*

$$J = \sum\_{i=1}^{L} \|D(j\,\omega)\epsilon(j\,\omega)\|^2\tag{22}$$

Minimize the objective function, and prompt ∂*J*/∂*aj*  = 0 (*j* = 1, 2, …, n) and ∂*J*/∂*bk*  = 0 (*k* = 1, 2, …, m), then two matrix equations will be obtained. By solving the matrix equations, we can get the estimated parameters *b*<sup>0</sup> , *b*1 , ⋯, *bm*, *a*<sup>1</sup> , *a*2 , ⋯, *an* .

**Table 1** shows actual frequency response obtained by experiments. We employ different sinusoidal input *r*(*t*) = *Am* sin *ωt* with different angular frequency *ω* (from 0.1 to 1 rad/s) to excite the open-loop system. By theoretical analysis, the output signals are in the form *y*(*t*) = *Af*  sin(*ωt* + *Φ*). Comparing the output with input sinusoidal signals, we can calculate the values of *A*<sup>f</sup> /*A*m and phase delay angle *Φ* based on the least square estimation as follows.

The output signals can be decomposed as

following.

The output signals can be decomposed as

$$\begin{array}{l} y(t) = A\sqrt{\sin(\alpha t + \Phi)} = A\sqrt{\cos\Phi}\sin\alpha t + A\sqrt{\sin\Phi}\cos\alpha t\\ = [\sin\alpha t \quad \cos\alpha t] \begin{bmatrix} A\_j \cos\Phi\\ A\_j \sin\Phi \end{bmatrix} \end{array} \tag{23}$$

First, we select the sampling interval *t* = 0, *h*, 2*h*, …, *nh*, where *h* is a step time.

Second, by defining *Y*<sup>=</sup> [*y*(0) *<sup>y</sup>*(*h*) … *<sup>y</sup>*(*nh*)] *<sup>T</sup>* , *c*<sup>1</sup>  = *Af*  cos *Φ*, *c*<sup>2</sup>  = *Af*  sin *Φ* and *<sup>Ψ</sup>* <sup>=</sup> [ sin(*ω*0) sin(*h*) … sin(*nh*) cos(*ω*0) cos(*h*) … cos(*nh*)] , the least square solutions of *c*<sup>1</sup> and *c*<sup>2</sup> can be derived as

$$
\begin{bmatrix} c\_1 \\ c\_2 \end{bmatrix} = (\Psi^\mu \Psi)^{-1} \Psi^\tau Y \tag{24}
$$

Third, *Af /Am* and *Φ* are calculated as

 *<sup>A</sup>*̂ *<sup>f</sup>* \_\_\_ *Am* = <sup>√</sup> \_\_\_\_\_ *c*1 <sup>2</sup> + *c*<sup>2</sup> 2 \_\_\_\_ *Am* , *Φ* = *tg*<sup>−</sup><sup>1</sup> (*c*<sup>2</sup> /*c*1) (25)

where *A*̂ *f* is the estimation of *Af* .

After *Af* /*Am* and *Φ* are obtained, it is easy to estimate the parameters *b*<sup>0</sup> , *b*1 , *a*1 and *a*<sup>2</sup> in Eq. (18) based on Levy's method. Finally, we get the identified transfer function:

*<sup>G</sup>*(*s*) <sup>=</sup> <sup>−</sup>38.48*<sup>s</sup>* <sup>−</sup> 141.4 \_\_\_\_\_\_\_\_\_\_\_\_\_ 1.523 *<sup>s</sup>* <sup>2</sup> <sup>+</sup> 8.324*<sup>s</sup>* <sup>+</sup> <sup>1</sup> (26)


**Table 1.** Actual frequency response (*ω* is angular frequency, rad/s; *Φ* is phase delay, rad).
