**4.2. CAD design of controller parameters for DC motor drive in time domain**

The computing algorithm is different from calculation of the controllers in the frequency domain and the task belongs to more complex one. The computation starts from the statespace model of the DC motor having two inputs in one output, in the form of state equations:

$$\dot{\mathbf{x}} = \mathbf{A}.\mathbf{x} + \mathbf{b}.\boldsymbol{\mu} + \mathbf{e}.\mathbf{z} = \begin{bmatrix} 0 & \frac{K\_m}{T\_m} \\ & T\_m.K\_a \\ -\frac{K\_a}{K\_m.T\_a} & -\frac{1}{T\_a} \end{bmatrix} \mathbf{x} + \begin{bmatrix} 0 \\ K\_T.K\_a \\ -\frac{T\_m}{T\_a} \end{bmatrix} \boldsymbol{\mu} + \begin{bmatrix} -\frac{K\_m^2}{T\_m.K\_a} \\ -\frac{T\_m.K\_a}{T\_m.K\_a} \end{bmatrix} \mathbf{M}\_z \tag{18}$$

$$\mathbf{y} = \mathbf{c}^T \mathbf{x} = \begin{bmatrix} \mathbf{1} & \mathbf{0} \end{bmatrix} \mathbf{x} \tag{19}$$

where **A** is system matrix, **x** – state vector, **b** – input vector, **c***T* – output (row) vector **e**-disturbance vector, *u* – input variable, y - output variable.

The final control structure with the feedback through the state controller vector *rT* is clear from the Simulink model Fig. 23. The integrator at the input serves to reject constant or slowly changing disturbances what is a common case.

The state control structure parameters: K , i <sup>1</sup> r and 2r are designed by known *pole placement method* where for a prescribed position of poles the required polynomial is compared with the system polynomial and missing parameters of the controller are calculated from a set of linear algebraic equations.

The control structure in Simulink to simulate the system is shown in (Fig. 23).

**Figure 23.** Simulink model of the state-space control of DC drive

Fig. 24 shows the GUI screen of the virtual model that enables to calculate state-space controller parameters and visualize time responses of the current and speed. It is a more complex GUI involving synthesis of the state-space controllers and giving the possibility to tune theoretically calculated parameters.

**Figure 24.** GUI screen for designing DC motor drive controllers in the state space domain

The panel *Controller parameters* serves to setting parameters of the state controller – by tuning or selecting the button *Optimal parameters* to calculate poles position placement.

Here:

338 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 1

The control structure in Simulink to simulate the system is shown in (Fig. 23).

**Figure 23.** Simulink model of the state-space control of DC drive

tune theoretically calculated parameters.

linear algebraic equations.

the system polynomial and missing parameters of the controller are calculated from a set of

Fig. 24 shows the GUI screen of the virtual model that enables to calculate state-space controller parameters and visualize time responses of the current and speed. It is a more complex GUI involving synthesis of the state-space controllers and giving the possibility to

**Figure 24.** GUI screen for designing DC motor drive controllers in the state space domain

The panel *Controller parameters* serves to setting parameters of the state controller – by tuning or selecting the button *Optimal parameters* to calculate poles position placement.


The state controller parameters are calculated automatically on basis of required values of control time and damping (panel *Poles***,** the item *Required poles of the system*). In the upper part of the panel the real positions of poles are shown.
