Keywords

Mathematical Subject Classification:

1 Introduction

The design of control strategies for dynamic systems with distributed parameters has been actively developed in recent decades. Optimization of dynamic models of elastic structures is an important problem arising in a large variety of applications in science and engineering. Theoretical foundations of optimal control problems with linear partial differential equations (PDEs) and convex functionals were established by Lions [17, 18]. Linear hyperbolic equations are studied in [1, 4]. An introduction to the control of vibrations can be found in [13]. Oscillating elastic networks are investigated in [10, 14, 16]. Since accurate modelling of these systems leads to a description in terms of PDEs, control design is usually based on specific approaches to solving direct and inverse problems.

Two different methods to the control design for distributed parameter processes can be emphasized. In the first approach, (the so-called late lumping), the control is directly designed for distributed parameter models and then converted to a finite-dimensional approximation. The infinite-dimensional control strategies can rely on specific spectrum analysis of the linear system operator (see, e.g., [3, 7]). The control method considered in [5] enables one to construct a constrained distributed control in closed form and ensures that the system is brought to a given state in a finite time. This method is based on a decomposition of the original system into simple subsystems by the Fourier approach. In [9], a numerical approach for the solution of PDE-constrained optimal control problems is adapted to hyperbolic equations. The method of choice proposed there is either a full discretization method for small size problems or the vertical method of lines for medium size problems.

In applications, the second approach, early lumping, is used for numerical control design. In accordance with this approach, the initial-boundary value problem is first discretized and reduced to a system of ordinary differential equations (ODEs), e.g., by means of the Rayleigh-Ritz or Galerkin methods. A family of Galerkin approximations based on solutions of the homogeneous beam equation was constructed and sufficient conditions for stabilizability of such finite-dimensional systems were derived in [19]. Alternatively, the finite-difference or finite-element method (FEM) can be used as it is shown in [2, 6]. The direct discretization approaches are also known in optimal control theory (e.g., see [15]).

One of the disadvantages of the early lumping is that it is rather difficult to relate the discretized system with its original distributed model. However, this connection can be estimated by following the method of integro-differential relations (MIDR) [12]. These estimates allow us to qualify finite-dimensional modelling, refine a coarse solution and make necessary corrections of the control law. The MIDR was extended in [11] to the optimal control design of elastic rod motions. In the paper, this approach is combined with the Ritz method and FEM to minimize the mean energy distributed in an elastic structure during controlled processes.

The paper is structured as follows: In Sect. 2, the PDE system that models the elastic rod dynamics is introduced. A variational formulation of the considered initial-boundary value problem is proposed in Sect. 3. In Sect. 4, a finite element algorithm is described based on this generalized statement. An optimal control problem for the elastic structure is formulated in Sect. 5. In the next section, the inverse dynamic problem is related with the proposed variational formulation of the direct problem. Section 7 is devoted to the FEM procedure including the successive minimization of the constitutive and control functionals. In Sect. 8, a numerical example of system modelling and optimization is presented and discussed. Finally, conclusions and a brief outlook are given.

2 Modelling of Elastic Rod Dynamics

As an example of elastic structure dynamics, longitudinal displacements of a thin rectilinear elastic rod are considered. In the Lagrange coordinate system, one end of the rod at \(x=0\) can move in accordance with some control law u(t), whereas the other end at \(x=L\) is free of load [11]. No external distributed forces are supposed.

Small vibrations of the elastic rod can be described by the linear equations

$$\begin{aligned}&\{t,x\}\in \varOmega : \quad p=\rho (x)w_t \quad \mathrm {and} \quad s=\kappa (x)w_x,\end{aligned}$$
(1)
$$\begin{aligned}&\{t,x\}\in \varOmega : \quad p_{t} =s_{x} \end{aligned}$$
(2)

with the initial and boundary conditions

$$\begin{aligned} \begin{aligned}&\quad \qquad \qquad \,\, t=0:\quad p=p_0(x) \quad \mathrm {and} \quad w=w_0(x), \\&x=0: \quad w=w_0(0)+u(t) \quad \mathrm {with} \quad u(0)=0, \quad x=L: \quad s=0. \end{aligned} \end{aligned}$$
(3)

Here, \(\varOmega =(0,T)\times (0,L)\) is the time-space domain, T is the time instant, \(\rho \) denotes the function of rod linear density, and \(\kappa \) is its distributed stiffness. The linear momentum density p(tx), the normal stresses in the cross section s(tx), and the displacements w(tx) are unknown functions. Some initial momentum density \(p_0(x)\) and displacements \(w_0(x)\) are given.

The choice of the example is stipulated by its practical relevance and possible extensions. The equations of elastic rod motions (1)–(3) describe also a wide class of dynamic systems with distributed parameters, starting with the classical spring model, including the elastic shaft torsion, and so on. Although the rod considered in the paper has internal parameters uniformly distributed along its length, the proposed algorithm can be easily generalized onto the non-uniform case. Nevertheless, the hyperbolic system with constant geometrical and mechanical parameters can serve itself a useful application for numerical verification of the control algorithm.

3 Variational Statement of the Direct Dynamic Problem

The solution \(p^{*}(t,x)\), \(s^{*}(t,x)\), \(w^{*}(t,x)\) of the initial-boundary value problem (1)–(3) may not exist in the classical sense (this depends on regularity of the functions \(\kappa (x)\), \(\rho (x)\), \(p_0(x)\), \(w_0(x)\), u(t)). To generalize the problem, we consider an integral statement of the constitutive laws proposed in [11] instead of the local formulation (1).

Let us introduce two auxiliary constitutive functions needed to relate the momentum density and velocities as well as the normal stresses and strains along the elastic rod in accordance with (1):

$$\begin{aligned} \eta (t,x)=w_{t}-\frac{p}{\rho (x)},\quad \xi (t,x)=w_{x}-\frac{s}{\kappa (x)}. \end{aligned}$$
(4)

On the solution these functions must be equal to zero.

For the direct problem of elastic rod motions, the generalized statement can be formulated as follows: Find the functions \(p^{*}(t,x)\), \(s^{*}(t,x)\), \(w^{*}(t,x)\) such that the integral equation

$$\begin{aligned} {\displaystyle \varPhi [p,s,w]=\int \limits _{\varOmega }\varphi \,d\varOmega =0 \quad \mathrm {with}\quad \varphi =\frac{1}{2}\left( \rho (x)\eta ^2+\kappa (x)\xi ^2\right) } \end{aligned}$$
(5)

holds as well as the constraints (2) and (3). Here, \(\varPhi \) is the constitutive functional in the energy norm with \(\varphi \) as the function of quadratic residual for the constitutive equations (1).

It is worth noting that the integrand \(\varphi \) defined in (5) has a dimension of linear energy density and nonnegative. This fact directly follows from properties of \(\varphi \), which imply that the functional \(\varPhi \) is also nonnegative. This allows us to reduce the integro-differential problem (2), (3), (5) to a variational one: Find those functions \(p^{*}(t,x)\), \(s^{*}(t,x)\), \(w^{*}(t,x)\) that minimize the functional

$$\begin{aligned} \varPhi [p^{*},s^{*},w^{*}]=\min \limits _{p,s,w}\varPhi [p,s,w]=0 \end{aligned}$$
(6)

subject to the constraints (2) and (3).

Denote the actual and arbitrarily chosen admissible momentum, stress, displacement fields via \(p^{*} \), \(s^{*} \), \(w^{*}\) and p, s, w, respectively. Define

$$ p=p^{*} +\delta p, \quad s=s^{*} +\delta s, \quad w=w^{*}+\delta w, $$

where \(\delta p\), \(\delta s\), \(\delta w\) are the respective variations of momentum density, stresses, and displacements. Then,

$$ \varPhi [p,s,w] = \varPhi [p^{*},s^{*},w^{*} ]+\delta \varPhi +\delta ^{2} \varPhi . $$

Here, \(\varPhi [p^{*},s^{*},w^{*}]=0\) in accordance with (5). The first variation of the functional can be presented as the sum \(\delta \varPhi =\delta _{p} \varPhi +\delta _{s} \varPhi +\delta _{w} \varPhi \) of the variations with respect to the unknowns p, s, w. It follows from the quadratic structure of the functional \(\varPhi \) that the second variation \(\delta ^{2} \varPhi =\varPhi [\delta p,\delta s,\delta w]\) is also nonnegative.

Let us express explicitly the first variation of the functional \(\varPhi \) and, consequently, the system of Euler–Lagrange equations with the corresponding natural conditions for the variational problem (2), (3), (6). For this purpose, the relation between the momentum function p and the stress function s imposed by the differential equation (2) should be used together with the corresponding relation between their variations

$$\begin{aligned} \delta p_{t} =\delta s_{x}. \end{aligned}$$

The necessary condition of stationarity is obtained after integration by parts of the relation for \(\delta \varPhi \) and taking into account the problem constraints (2) and (3),

$$\begin{aligned}&\qquad \qquad \delta _{p} \varPhi +\delta _{s} \varPhi +\delta _{w} \varPhi =0, \\&\begin{aligned} \delta _{p} \varPhi&=-\int \limits _{\varOmega }\eta \delta p\, d\varOmega , \quad \delta _{s} \varPhi = -\int \limits _{\varOmega }\xi \delta s\, d\varOmega , \\ \delta _{w} \varPhi&= -\int \limits _{\varOmega }\left( \rho (x) \eta _{t} +(\kappa (x) \xi )_{x} \right) \delta w\, d\varOmega \\&\quad +\int \limits _{0}^{L}\left[ \rho (x) \eta \delta w \right] _{t=T} dx + \int \limits _{0}^{T}\left[ \kappa (x) \xi \delta w\right] _{x=L} dt. \end{aligned} \nonumber \end{aligned}$$
(7)

From (7), we see that \(\delta \varPhi =0\) over all admissible variations \(\delta p\), \(\delta s\), \(\delta w\) if the equalities (1) hold.

Introduce an auxiliary function

$$ \zeta (t,x) = -\int \limits _{0}^{t}\eta (\tau ,x) d\tau $$

and get the expression for the first variations with respect to p and s after some equivalent transformations as follows

$$\begin{aligned} \delta _{\,p} \varPhi +\delta _{s} \varPhi&= \int \limits _{\varOmega }\zeta _{\,t} \delta p\, d\varOmega -\int \limits _{\varOmega }\xi \delta s\, d\varOmega \nonumber \\ \displaystyle&= \int \limits _{\varOmega }\left( \zeta _{\,x} -\xi \right) \delta s\, d\varOmega + \int \limits _{0}^{L}\left[ \zeta \delta p\right] _{t=T} dx +\int \limits _{0}^{T}\left[ \zeta \delta s\right] _{x=0} dt. \end{aligned}$$
(8)

By using (7) and (8), it is possible to derive the Euler-Lagrange system with the corresponding boundary and terminal conditions

$$\begin{aligned} \begin{aligned}&\quad \rho (x) \zeta _{\,tt} - \left( \kappa (x) \zeta _{\,x} \right) _{x} =0, \quad \xi =\zeta _{\,x}; \\&\left. \zeta \right| _{x=0} =\left. \zeta _{\,x} \right| _{x=L} = \left. \zeta \right| _{t=T} =\left. \zeta _{\,t} \right| _{t=T} =0. \end{aligned} \end{aligned}$$
(9)

This homogeneous system is a terminal-boundary value problem with respect to the variable \(\zeta (t,x)\). It can be shown that there is only a trivial solution of this problem and hence \(\xi =0\) and \(\eta =0\). In other words, if the solution \(p^{*} \), \(s^{*} \), \(w^{*}\) of the problem (1)–(3) exists in the classical sense then the system of necessary conditions (9) together with the essential constraints (2) and (3) is equivalent to the original problem of elastic rod motion (1)–(3). This means that the statement (2), (3), (5) is given correctly in terms of the calculus of variations.

4 Finite Element Technique Based on the Ritz Method

The system (1)–(3) is solved by variational approach, which is a modification of the Ritz method based on the MIDR discussed in [12]. The law of momentum balance (2) holds automatically if two auxiliary functions (kinematic \(\tilde{w}(t,x)\) and dynamic \(\tilde{r}(t,x)\)) are introduced such that

$$\begin{aligned} p=\tilde{r}_x(t,x)+p_0(x), \quad s=\tilde{r}_{t}(t,x), \quad w=\tilde{w}(t,x)+w_0(x). \end{aligned}$$
(10)

The initial and boundary conditions for the new variables \(\tilde{w}\) and \(\tilde{r}\) are defined as follows:

$$\begin{aligned} t=0: \quad \tilde{w}=0 \quad \mathrm {and} \quad \tilde{r}=0, \quad x=0: \quad \tilde{w}=u(t), \quad x=L: \quad \tilde{r}=0. \end{aligned}$$
(11)

Let us restate the initial-boundary value problem (1)–(3) in the variational form. Find the functions \(\tilde{w}^*(t,x)\) and \(\tilde{r}^*(t,x)\) subject to the constraints (11) and such that

$$\begin{aligned}&\displaystyle \varPhi [\tilde{w}^*,\tilde{r}^*] = \min \limits _{\tilde{w},\tilde{r}}\varPhi [\tilde{w},\tilde{r}], \quad \displaystyle \varPhi = \frac{1}{2}\int \limits _\varOmega \left( \rho (x)\eta ^2+\kappa (x)\xi ^2\right) d\varOmega ,\\&\qquad \displaystyle \eta =\tilde{w}_t-\frac{\tilde{r}_x+p_0(x)}{\rho (x)}, \quad \xi = \tilde{w}_x+w^\prime _0(x)-\frac{\tilde{r}_{t}}{\kappa (x)}, \nonumber \end{aligned}$$
(12)

Here, \(\eta \) and \(\xi \) are the constitutive functions (4) expressed through the new independent variable \(\tilde{w}\) and \(\tilde{r}\).

To solve the minimization problem (11)–(12), we use piecewise polynomial approximations with respect to the time and space. For the triangulation of the domain \(\varOmega \) shown in Fig. 1, these approximations are given by the relations

$$\begin{aligned} \begin{aligned} \tilde{w}\in \mathscr {S}^h_w&= \left\{ \begin{aligned} \tilde{w}(t,x):\ \tilde{w}=\sum _{k+l=0}^{K} w_{jmn}^{(kl)}t^k x^l, \quad \{t,x\}\in \varDelta _{jmn}, \\ j=1,\ldots ,4, \quad m=1,\ldots ,M, \quad n=1,\ldots ,N \end{aligned} \right\} \cap C^{0}. \\ \tilde{r}\in \mathscr {S}^h_r&= \left\{ \begin{aligned} \tilde{r}(t,x):\ \tilde{r}=\sum _{k+l=0}^{K}r_{jmn}^{(kl)}t^k x^l, \quad \{t,x\}\in \varDelta _{jmn}, \\ j=1,\ldots ,4,\quad m=1,\ldots ,M,\quad n=1,\ldots ,N \end{aligned} \right\} \cap C^{0}. \end{aligned} \end{aligned}$$
(13)

Here, \(\varDelta _{jmn}\) denotes the corresponding subdomain of a triangular mesh described in Fig. 1.

Fig. 1
figure 1

Triangulation of the time-space domain \(\varOmega \)

The mesh is defined by the nodes on the axes t and x as follows:

$$\begin{aligned} \begin{aligned} x_{m}&> x_{m-1},\quad&m&= 1,\ldots ,M+1, \quad&x_{1}&=0, \quad&x_{M+1}&= 1; \\ t_{n}&> t_{n-1},\quad&n&= 1,\ldots ,N+1, \quad&t_{1}&=0, \quad&t_{N+1}&= T. \end{aligned} \end{aligned}$$

The domain \(\varOmega \) is divided by the straight lines \(x=x_m\) and \(t=t_n\) (see Fig. 1) into MN rectangles \(\varOmega _{mn} =(t_{n},t_{n+1})\times (x_{m},x_{m+1})\) with \(m=1,\ldots ,M\) and \(n=1,\ldots ,N\).

The rectangle vertices \(\{t_n,x_m\}\) are denoted by \(A_{mn}\) with the corresponding edges \(A_{kl}A_{mn}\) between \(A_{kl}\) and \(A_{mn}\). For brevity, let \(T_{mn}=A_{mn} A_{m,n+1}\) and \(L_{mn}=A_{mn} A_{m+1,n}\).

The diagonals of the rectangle \(\varOmega _{mn}\) (see Fig. 2) divide it in turn into four triangles

$$\begin{aligned} \begin{aligned} \varDelta _{mn,1}&= B_{mn} A_{mn} A_{m,n+1}, \quad&\varDelta _{mn,2}&= B_{mn} A_{m,n+1} A_{m+1,n+1}, \\ \varDelta _{mn,3}&= B_{mn} A_{m+1,n+1} A_{m+1,n}, \quad&\varDelta _{mn,4}&= B_{mn} A_{m+1,n} A_{mn}. \end{aligned} \end{aligned}$$
(14)

Here, \(B_{mn}\) is the intersection point of the diagonals \(A_{mn}A_{m+1,n+1}\) and \(A_{m,n+1} A_{m+1,n}\). Let us introduce the notation for the inclined edges of the triangle (14). We denote

$$\begin{aligned} \begin{aligned} Q_{mn,1}&= B_{mn} A_{m,n+1}, \quad&Q_{mn,2}&= B_{mn} A_{m+1,n+1}, \\ Q_{mn,3}&= B_{mn} A_{m+1,n}, \quad&Q_{mn,4}&= B_{mn}A_{mn}. \end{aligned} \end{aligned}$$
Fig. 2
figure 2

Mesh structure on the rectangle \(\varOmega _{mn}\)

The unknown functions \(\tilde{w}(t,x)\) and \(\tilde{r}(t,x)\) are approximated in each of 4MN triangles \(\varDelta _{nmj}\) by a complete bivariate polynomial of the order K in the Bézier-Bernstein form [8]. In accordance with this form, the variables \(\tilde{w}\) and \(\tilde{r}\) in any triangle \(\varDelta \subset \varOmega \) with the vertices \(A_{i}=\{t_{i},x_{i}\} \in \overline{\varOmega }\), \(i=1,2,3\) (a local vertex indexing is given bypassing the triangle contour counterclockwise) are expressed by the relations

$$\begin{aligned} \begin{aligned} w(t,x)=\sum _{k+l=0}^{K}w_{kl} B_{kl}^{K} (t,x), \quad r(t,x)=\sum _{k+l=0}^{K}r_{kl} B_{kl}^{K} (t,x), \\ B_{kl}^{K} (t,x)=\frac{K!}{k!l!(K-k-l)!} b_{1}^{k} (t,x)b_{2}^{l} (t,x)b_{3}^{K-k-l} (t,x), \end{aligned} \end{aligned}$$
(15)

Here, the linear functions

$$\begin{aligned} \begin{aligned} b_{1}(t,x)&= d^{-1}(x_{2} -x_{3} )(t-t_{3} )-d^{-1}(t_{2} -t_{3} )(x-x_{3}), \\ b_{2}(t,x)&= d^{-1}(x_{3} -x_{1} )(t-t_{1} )-d^{-1}(t_{3} -t_{1} )(x-x_{1}), \\ b_{3}(t,x)&= d^{-1}(x_{1} -x_{2} )(t-t_{2} )-d^{-1}(t_{1} -t_{2})(x-x_{2}), \end{aligned} \end{aligned}$$

are introduced and

$$ d=\det \mathbf {T}, \quad \mathbf {T} = \begin{bmatrix} t_{1}&t_{2}&t_{3} \\ x_{1}&x_{2}&x_{3} \\ 1&1&1 \end{bmatrix}, $$

where \(\mathbf {T}\) is the extended coordinate matrix, which determinant d equals to the doubled area of the triangle \(\varDelta \). The functions \(b_{i}\), the so-called barycentric coordinates, have the following properties:

$$ b_{i}(t_{i},x_{i})=1, \quad b_{i}(t_{j},x_{j})=0, \quad i\ne j,\ i,j=1,2,3, \quad b_{1} +b_{2} +b_{3} = 1. $$

According to the Eq. (15), for a chosen piecewise polynomial, the total number of parameters \(w_{kl}^{(mnj)}\) and \(r_{kl}^{(mnj)}\) in the mesh element \(\varDelta _{mnj}\) is equal to \(N_{\varDelta }=(K+1)(K+2)/2\). These degrees of freedom can be symbolically marked by circles as it is shown in Fig. 2 for \(K=4\).

The vector \(\hat{\mathbf {z}}=\{\hat{z}_{i}\}\in {\mathbb R}^{N_{l}}\) consisting of all such local parameters has the dimension \(N_{l} =8\textit{MNN}_{\varDelta }\). The sequence of the vector components \(\hat{z}_{i}\) can be chosen so that

$$\begin{aligned} \begin{aligned}&\quad \hat{z}_{i_{1}} = w_{kl}^{(mnj)}, \quad \hat{z}_{i_{2}} = r_{kl}^{(mnj)}, \quad i_{1} = j_{0} +k_{0}, \quad i_{2} = N_{\varDelta } +j_{0} +k_{0}, \\&j_{0} = 4\left( 2\left( (m-1)N+n-1\right) +j-1\right) N_{\varDelta }, \quad k_{0} =\frac{k(2K-k+3)}{2} +l+1, \\&\qquad \qquad \,\, m=1,\ldots ,M, \quad n=1,\ldots ,N, \quad j=1,2,3,4, \\&\qquad \qquad \qquad \quad k=0,\ldots ,K, \quad l=0,\ldots ,K-k. \end{aligned} \end{aligned}$$
(16)

Here, \(j_0\) is the index of the last coefficient for the previous triangle, \(k_0\) defines one-dimensional indexing of the Bézier-Bernstein coefficients \(w_{kl}^{(mnj)}\) related with \(\varDelta _{mnj}\).

Let us define the vector of discontinuous basis functions

$$ \mathbf {a}(t,x)=\left\{ a_{i} (t,x)\right\} \in {\mathbb R}^{N_{l}}, $$

which corresponds to \(\hat{\mathbf {z}}\) in accordance with the relation

$$ a_{i_{1}} = a_{i_{2}} = {\left\{ \begin{array}{ll} B_{kl}^{(mnj)}(t,x), &{} \{t,x\} \in \varDelta _{mnj}, \\ 0, &{} \{t,x\} \notin \varDelta _{mnj}. \end{array}\right. } $$

The Bézier-Bernstein polynomial \(B_{kl}^{(mnj)}\) of the order K is introduced in the triangle \(\varDelta _{mnj}\) by relations similar to (15). The corresponding indices \(i_{1}\) and \(i_{2}\) are given in (16). In this case, the approximations of dynamic and kinematic fields can be presented as follows:

$$\begin{aligned} \hat{u}=\hat{\mathbf {w}}^{\mathrm{T}} (t,x)\hat{\mathbf {z}},\quad \hat{r}=\hat{\mathbf {r}}^{\mathrm{T}} (t,x)\hat{\mathbf {z}},\quad \hat{\mathbf {w}}=\mathbf {E}_{w} \mathbf {a}(t,x),\quad \hat{\mathbf {r}}=\mathbf {E}_{r} \mathbf {a}(t,x). \end{aligned}$$
(17)

Here,

$$ \begin{aligned} \mathbf {\mathbf {E}}_{w}&= \begin{bmatrix} \mathbf {E}_{w}^{0}&\mathbf {0}&\cdots&\mathbf {0} \\ \mathbf {0}&\mathbf {E}_{w}^{0}&\cdots&\mathbf {0} \\ \vdots&\vdots&\ddots&\vdots \\ \mathbf {0}&\mathbf {0}&\cdots&\mathbf {E}_{w}^{0} \end{bmatrix} \in {\mathbb R}^{N_{l}\times N_{l}}, \quad&\text{ where } \mathbf {E}_{w}^{0} = \begin{bmatrix} \mathbf {I}_{N_{\varDelta }}&\mathbf {0} \\ \mathbf {0}&\mathbf {0} \end{bmatrix} \\ \mathbf {E}_{r}&= \begin{bmatrix} \mathbf {E}_{r}^{0}&\mathbf {0}&\cdots&\mathbf {0}\\ \mathbf {0}&\mathbf {E}_{r}^{0}&\cdots&\mathbf {0} \\ \vdots&\vdots&\ddots&\vdots \\ \mathbf {0}&\mathbf {0}&\cdots&\mathbf {E}_{r}^{0} \end{bmatrix} \in {\mathbb R}^{N_{l}\times N_{l}}, \quad&\text{ where } \mathbf {E}_{r}^{0} = \begin{bmatrix} \mathbf {0}&\mathbf {0} \\ \mathbf {0}&\mathbf {I}_{N_{\varDelta }} \end{bmatrix}, \end{aligned} $$

and \(\mathbf {I}_{n}\) denotes the identity matrices of the dimension \(n\times n\).

5 Optimal Control Problem

Now we consider an inverse dynamic problem for the elastic rod model discussed above. In accordance with the variational formulation of the initial-boundary value problem (11)–(12), minimum of the constitutive functional \(\varPhi [\tilde{r},\tilde{w}]\) is first sought for any sufficiently smooth function \(u(t)\in {\mathscr {U}}\). The control problem is to find such a function \(u^{*} (t)\in {\mathscr {U}}\) that moves the elastic rod at the fixed time instant T to the finale state

$$\begin{aligned} t=T:\quad p=0, \quad w=w_T=\text{ const }, \quad u=u_T=w_T-w_0(0) \end{aligned}$$
(18)

and minimizes the mean energy \(\bar{E}\) of the rod

$$\begin{aligned} J[u^*] = \min \limits _{u\in {\mathscr {U}}}J[u], \quad J = \bar{E}. \end{aligned}$$
(19)

Here

$$\begin{aligned}&\bar{E} = \frac{\varPsi }{T}, \quad \varPsi = \int \limits _{0}^{T}E\,dt, \quad E = \int \limits _{0}^{L}\psi \,dx, \end{aligned}$$
(20)
$$\begin{aligned}&\psi =\frac{1}{2}\left( \rho ^{-1}(x)\left( \tilde{r}_{x}+p_0(x)\right) ^{2} + \kappa (x)\left( \tilde{w}_{x}+w^\prime _0(x)\right) ^{2} \right) . \end{aligned}$$
(21)

Here, E is the total mechanical energy of the moving elastic structure with its linear density \(\psi \) expressed through the variables \(\tilde{r}(t,x,u)\) and \(\tilde{w}(t,x,u)\).

6 Discretization and Regularization of the Control Problem

According to (11) and (13), the admissible control function \(u(t)=\tilde{w}(t,0)\) taken in numerical realization has to be piecewise polynomial. Let \(\hat{\mathbf {u}}=[u_1,\ldots , u_{KN}]^{\mathrm {T}}\in {\mathbb R}^{KN}\) be the vector of control parameters. In this case, the KN components of the vector \(\hat{\mathbf {u}}\) are used to meet \(2KM+2\) terminal conditions in the optimal control problem (18)–(20). Even if the terminal values (18) are admissible for the splines \(\tilde{r}(t,x)\in \mathscr {S}^h_r\) and \(\tilde{w}(t,x)\in \mathscr {S}^h_w\), the momentum density and displacements resulting from (10) with the approximations (13) for terminal constraints more general than the piecewise polynomial ones cannot be apparently satisfied.

The terminal conditions (18) can be weakened by introducing some tolerance \(\varepsilon _1>0\). For example, the total energy of the rod at the end of the controlled process can be constrained by some small value

$$ E_1 = E(T) \le \varepsilon _1 \ll \bar{E}. $$

As it has been shown in numerical calculations, the accuracy of approximate solutions may dramatically fall down through the optimization of the control input u(t). To regulate the error level and ensure the reliability of modelling, an upper limit of the error functional \(\varPhi \) should be given

$$ E_2 = T^{-1}\varPhi \le \varepsilon _2 \ll E_1. $$

Such a tolerance can be guaranteed by two isoperimetric conditions imposed on the energy functionals

$$\begin{aligned} E_1=\varepsilon _1 \quad \mathrm {and} \quad E_2=\varepsilon _2. \end{aligned}$$
(22)

After parametric optimization of the functional \(\varPhi \) according to (11)–(13) for a arbitrary vector \(\hat{\mathbf {u}}\), the problem (18)–(20) with the integral conditions (22) is equivalent to the following minimization: Find the control vector \(\hat{\mathbf {u}}^*\) that moves the rod end at \(x=0\) in the fixed time T to the final position \(w_T\) and minimizes the energy functional

$$\begin{aligned} J(\hat{\mathbf {u}}^*) = \min _{\hat{\mathbf {u}}} J(\hat{\mathbf {u}}), \quad w(T,0)=w_T; \quad J=\bar{E}+\gamma _1 E_{1}+\gamma _2 E_{2}, \quad \gamma _{1,2} \ge 0. \end{aligned}$$
(23)

Here, \(\bar{E}\) is the mean energy of the rod, \(E_1\) is the terminal energy of the system, \(E_2\) is the integral error of approximate solution, \(\gamma _{1}\) and \(\gamma _{2}\) are the weighting factors introduced to achieve the given values of \(E_1\) and \(E_2\) in accordance with (22), \(\psi \) is the rod energy density.

The optimal control vector \(\hat{\mathbf {u}}^*\) as well as the corresponding function \(u^{*}(t)=u(t,\hat{\mathbf {u}}^*)\), the approximation of displacements \(w^*(t,x)=w(t,x,\hat{\mathbf {u}}^*)\), momentum density \(p^*(t,x)=p(t,x,\hat{\mathbf {u}}^*)\), and normal stresses \(s^*(t,x)=s(t,x,\hat{\mathbf {u}}^*)\) are found in accordance with the algorithm described below.

7 Numerical Algorithm of Control Optimization

As it is seen in (13), the unknown functions \(\tilde{r}(t,x)\) and \(\tilde{w}(t,x)\) on the triangle \(\varDelta _{mnj}\) of the time-space mesh are defined by the parameters \(r_{kl}^{(mnj)}\) and \(w_{kl}^{(mnj)}\), which number is equal to \(2N_{\varDelta }=(K+1)(K+2)\). The local parameters have been collected into a vector \(\hat{\mathbf {z}}\in {\mathbb R}^{N_{l}}\) with the dimension \(N_{l}=8MNN_{\varDelta }\) in accordance with (16) and the approximations (13) can be presented as in (17).

By satisfying the continuous conditions imposed on the fields \(\tilde{r}(t,x)\) and \(\tilde{w}(t,x)\), the matrix \(\mathbf {Q}\in {\mathbb R}^{N_{l} \times N_{g} }\) is derived. It relates the global and local parameter vectors according to the relation \(\hat{\mathbf {z}}=\mathbf {Q}\mathbf {z}\). The resulting continuous fields are expressed in the vector form as follows:

$$\begin{aligned} \tilde{r}(t,x,z)=\mathbf {r}^{\mathrm{T}} (t,x)\mathbf {z}, \quad \tilde{w}(t,x,z)=\mathbf {w}^{\mathrm{T}} (t,x)\mathbf {z}. \end{aligned}$$
(24)

For the optimal control problem, the vector of global parameters can be presented by the relations

$$\begin{aligned}&\mathbf {z} = \begin{bmatrix} \mathbf {y}^{\mathrm{T}}&\mathbf {u}^{\mathrm{T}}&\mathbf {q}^{\mathrm{T}} \end{bmatrix}^{\mathrm{T}} \in {\mathbb R}^{N_{g}}, \quad \mathbf {y}\in {\mathbb R}^{N_{y}}, \quad \mathbf {u}\in {\mathbb R}^{N_{u}}, \quad \mathbf {q}\in {\mathbb R}^{N_{q}}, \\&\quad N_{g} =N_{y} +N_{u} +N_{q}, \quad N_{y} = 4KMN, \quad N_{u} =KN-1. \end{aligned}$$

Here, \(\mathbf {y}\) is the vector of designed parameters, \(\mathbf {u}\) denotes the vector of control parameters that remain after satisfying the terminal displacement condition in (23), \(\mathbf {q}\) is the vector of system parameters that depends only on the terminal value \(u_T\). It is always possible to reduce the problem to the case \(u_{T}=1\) by scaling and to eliminate the vector \(\mathbf {q}\) from consideration.

After substituting the approximation \(\tilde{r}(t,x,\mathbf {z})\) and \(\tilde{w}(t,x,\mathbf {z})\) from (13) into the functional of (12) and integrating over the domain \(\varOmega \), we obtain

$$ \tilde{\varPhi }(\mathbf {z}) = \varPhi [\tilde{u},\tilde{r}] = \frac{1}{2} \mathbf {z}^{\mathrm{T}} \mathbf {F}\mathbf {z}+\mathbf {f}^{\mathrm {T}}\mathbf {z}+f. $$

By taking into account the structure of the vector \(\mathbf {z}\) and quadratic form of the functional \(\varPhi \), the matrix \(\mathbf {F}\in {\mathbb R}^{N_{g}\times N_{g}}\) and the vector \(\mathbf {f}\in {\mathbb R}^{N_{g}}\) are defined in the form

$$ \mathbf {F} = \begin{bmatrix} \mathbf {F}_{yy}&\mathbf {F}_{yu}&\mathbf {0} \\ \mathbf {F}_{yu}^{\mathrm{T}}&\mathbf {F}_{uu}&\mathbf {0} \\ \mathbf {0}&\mathbf {0}&\mathbf {0} \end{bmatrix}, \quad \mathbf {f} = \begin{bmatrix} \mathbf {f}_{y} \\ \mathbf {f}_{u} \\ \mathbf {0} \end{bmatrix}, \quad {\left\{ \begin{array}{ll} \mathbf {F}_{yy} = \mathbf {F}_{yy}^{\mathrm{T}} \in {\mathbb R}^{N_{y} \times N_{y}} \quad \mathbf {F}_{uu} = \mathbf {F}_{uu}^{\mathrm{T}} \in {\mathbb R}^{N_{u} \times N_{u}}, \\ \mathbf {f}_{y} \in {\mathbb R}^{N_{y}},\quad \mathbf {f}_{u} \in {\mathbb R}^{N_{u}} \quad f \in {\mathbb R}. \end{array}\right. } $$

Minimum of the function \(\tilde{\varPhi }\) is attained if

$$\begin{aligned} \mathbf {y} = \tilde{\mathbf {y}} = -\mathbf {F}_{yy}^{-1} \left( \mathbf {F}_{yu} \mathbf {u}+\mathbf {f}_{y}\right) . \end{aligned}$$

Similarly, the control functional \(\hat{J}(\mathbf {z})=J[\tilde{u},\tilde{r}]\) in (23) is quadratic with respect to the vector \(\mathbf {z}\) and can be represented in the form

$$ \hat{J}(\mathbf {y},\mathbf {u}) = \frac{1}{2} \begin{bmatrix} \mathbf {y} \\ \mathbf {u} \end{bmatrix}^{\mathrm{T}} \begin{bmatrix} \mathbf {J}_{yy}&\mathbf {J}_{yu} \\ \mathbf {J}_{yu}^{\mathrm{T}}&\mathbf {J}_{uu} \end{bmatrix} \begin{bmatrix} \mathbf {y} \\ \mathbf {u} \end{bmatrix} + \begin{bmatrix} \mathbf {j}_{y} \\ \mathbf {j}_{u} \end{bmatrix}^{\mathrm{T}} \begin{bmatrix} \mathbf {y} \\ \mathbf {u} \end{bmatrix} + J_0, $$

where

$$ \mathbf {J}_{yy}=\mathbf {J}_{yy}^{\mathrm{T}} \in {\mathbb R}^{N_{y}\times N_{y}}, \quad \mathbf {J}_{uu} = \mathbf {J}_{uu}^{\mathrm{T}} \in {\mathbb R}^{N_{u}\times N_{u}}, \quad \mathbf {j}_{y} \in {\mathbb R}^{N_{y}}, \quad \mathbf {j}_{u} \in {\mathbb R}^{N_{u}}, \quad J_0 \in {\mathbb R}. $$

After that, the vector of design parameter \(\tilde{\mathbf {y}}\) is substituted into the cost function \(\hat{J}(\mathbf {y},\mathbf {u})\) and we obtain

$$ \tilde{J}(\mathbf {u}) = \hat{J}\left( \tilde{\mathbf {y}}(\mathbf {u}),\mathbf {u}\right) = \frac{1}{2}\mathbf {u}^\mathrm{T}\mathbf {G}\mathbf {u}+\mathbf {g}^\mathrm{T}\mathbf {u}+G, \quad \mathbf {G}=\mathbf {G}^\mathrm{T}. $$

As a result, the original control problem is reduced to the unconstrained minimization for the function \(\tilde{J}(\mathbf {u})\). The optimal control vector is found as \(\mathbf {u}^{*} =-\mathbf {G}^{-1} \mathbf {g}\) and the design parameter vector as \(\mathbf {y}^{*}=\tilde{\mathbf {y}}(\mathbf {u}^{*} )\). By changing the vector \(\mathbf {z}\) for the optimal vector \(\mathbf {z}^{*} =\begin{bmatrix} (\mathbf {y}^*)^{\mathrm {T}}&(\mathbf {u}^{*})^{\mathrm {T}}&\mathbf {q} \end{bmatrix}^{\mathrm {T}}\) in (24) and taking into account (10), approximations of the momentum density, stress and displacement fields are obtained as \(\tilde{p}^{*}=\tilde{p}(t,x,\mathbf {z}^{*})\), \(\tilde{s}^{*}=\tilde{s}(t,x,\mathbf {z}^{*})\), \(\tilde{w}^{*}=\tilde{w}(t,x,\mathbf {z}^{*})\).

The relative energy error \(\varDelta \) of the approximate solution is given by the relation

$$ \varDelta =\tilde{\varPhi }(\mathbf {z}^{*} )\tilde{\varPsi }^{-1} (\mathbf {z}^{*}), \quad \tilde{\varPsi }(\mathbf {z})=\varPsi [\tilde{r}(t,x,\mathbf {z}),\tilde{w}(t,x,\mathbf {z})], $$

where \(\varPsi =T\bar{E}\) is the energy integral over the time interval [0, T] defined in (20).

8 Simulation and Solution Quality Estimates

We choose the dimensionless parameters of the system \(\rho =\kappa =L=1\), the initial functions \(p_0(x)=w_0(x)=0\), and the control parameters \(T=4\), \(w_T=1\), \(\gamma _1=10^4\), \(\gamma _2=10^{-4}\). The algebraic order of the approximating system is \(N_y=4MNK^2\). For the test control function

$$\begin{aligned} u = u_0(t) = 3t^2T^{-2}-2t^3T^{-3}, \end{aligned}$$
(25)

the relative integral error \(\varDelta =E_2\bar{E}^{-1}\) versus the dimension \(N_y\) is presented in Fig. 3.

The so-called h-convergence is depicted by solid lines for homogeneous meshes (\(M=N=1\div 7\)) and different polynomial orders (from \(K=3\) to \(K=6\)). The rate of p-convergence when the polynomial degree is varied (\(K=3\div 7\)) is given by a dashed line for the fixed triangulation with \(M=N=1\). We see that the accuracy of numerical solutions grows up fast if the dimension increases.

Fig. 3
figure 3

Relative error \(\varDelta \) versus the approximation dimension \(N_y\)

Local values of the solution error can be defined by the function \(\varphi (t,x)\). The time-space error distribution is depicted in Fig. 4 for the following approximation parameters: \(K=6\) and \(M=N=4\). The relative integral error for the mesh is equal to \(\varDelta =6.4 \times 10^{-7}\). The mean mechanical energy over the process equals to \(\bar{E}=0.0984\).

Fig. 4
figure 4

Local error distribution \(\varphi (t,x)\)

It can be verified that there exists a piecewise polynomial solution for this specific test control parameters. Moreover, the polynomials are defined on those triangular subdomains of the time-space domain \(\varOmega \) which are bounded by the characteristic lines

$$ x-t=0, \quad x-t=2, \quad x+t=2, \quad x+t=4. $$

The order of the polynomials is equal to 3 and \(p(t,x)=s(t,x)=w(t,x)\equiv 0\) if \(t\le x\).

It turns out for the mesh topology under consideration that some of the triangle edges coincide with these characteristic lines if \(N=4M\). In this case, the exact solution can be found (up to the round-off error) by using the finite-element approximations of the unknown functions \(\tilde{r}(t,x)\) and \(\tilde{w}(t,x)\) with the polynomial order \(K\ge 3\). Such a superconvergence property is exploited below to obtained the momentum, stress and displacement fields. The relative displacements of the elastic rod \(w(t,x)-u(t)\) with the control input \(u=u_0(t)\) are shown in Fig. 5 for \(K=3\), \(M=1\), and \(N=4\).

Fig. 5
figure 5

Relative rod displacements \(w(t,x)-u^0(t)\) for the test motion

The distributions of the momentum density p(tx) and the normal stresses p(tx) for the same test control \(u_0(t)\) are depicted in Figs. 6 and 7, respectively. Here, the nonanaliticity along the characteristic lines can be seen more distinctively. It is certainly difficult to approximate rather accurately place where the function breaks if such a line is located inside a mesh element. These breaks cause error surges for unappropriate meshes as it can be seen in Fig. 4.

Fig. 6
figure 6

Momentum density p(tx) for the test motion

Fig. 7
figure 7

Stress distribution s(tx) for the test motion

The optimal control as a piecewise polynomial function has been found for the given parameters \(K=3\), \(M=1\), and \(N=4\) (\(N_y=144\), \(N_u=11\)). In Fig. 8, the optimal control displacement of the rod end \(u^*(t)\) (dash-dot curve) is compared with the test control \(u_0(t)\) considered in (25) (dashed curve). The optimal input is near to linear one, but the moderate deviation from the uniform motion \(u^*(t)-T^{-1} t\), which is traced in this figure by solid curve with the scaling factor of 10, influences sufficiently on the whole elastic deformations of the rod.

Fig. 8
figure 8

Test control \(u_0(t)\) versus optimal control \(u^*(t)\)

The optimal displacements of the rod points \(\tilde{w}^*\) as a function of the time t and coordinate x are shown in Fig. 9. The optimal momentum \(\tilde{p}^*(t,x)\) and stresses \(\tilde{s}^*(t,x)\) are depicted in Figs. 10 and 11, respectively.

Fig. 9
figure 9

Absolute rod displacements w(tx) for the optimal motion

Fig. 10
figure 10

Momentum density p(tx) for the optimal motion

Fig. 11
figure 11

Stress distribution s(tx) for the optimal motion

By using the obtained control law, a sufficiently low value of terminal energy \(E_1 = 9 \times 10^{-11}\) is attained as compared with the average energy of the elastic rod \(\bar{E}=0.0636\). The relative error achieved for the optimal control does not exceed \(\varDelta < 10^{-15}\). The weighting coefficients are chosen so that the following inequality holds: \(E_2\ll E_1 \ll \bar{E}\).

It is worth noting that any significant vibrations of the rod are not excited during the control process. The corresponding changes in the dimension of the spline approximation (13) and, therefore, in control dimension does not cause any significant decreasing of the minimized mean energy for the control process as presented in Table 1.

Table 1 Optimal energy values versus approximation and control dimensions

9 Conclusions and Outlook

In this paper, a control algorithm for energy optimization in structural dynamics has been proposed and discussed. This control strategy is based on the MIDR, variational approach, and on finite element techniques. The verification of optimal control laws has been performed by taking into account the explicit local and integral error estimates.

In a subsequent research, we plan to apply the optimization algorithm proposed in this paper to more complex elastic systems with non-uniformly distributed parameters and to motions of 2D and 3D elastic bodies. Various mesh refinement and mesh adaptation approaches can be applied to increase the solution accuracy. Other dynamical models of solids, e.g., viscoelastic body and structures with geometrical and physical nonlinearity are to be considered from the viewpoint of the calculus of variation. Optimal problems with non-quadratic cost functions and control constraints and other inverse problems such as identification, measurements, etc. can also be considered as a great challenge for the method proposed.