## 3 Controller Design
### IDA-PBC Methodology  
The IDA-PBC methodology was introduced as a controller design method for systems described by PCH models of the form  
\[\sum:\left\{\begin{array}{l}\dot{\mathbf{x}}=[\mathbf{J}(\mathbf{x})-\mathbf{ R}(\mathbf{x})]\frac{\partial H}{\partial\mathbf{x}}(\mathbf{x})+\mathbf{g}( \mathbf{x})\mathbf{u},\\ \mathbf{y}=\mathbf{g}(\mathbf{x})\frac{\partial H}{\partial\mathbf{x}}( \mathbf{x}),\end{array}\right. \tag{2}\]  
where \(\mathbf{x}\in\mathbb{R}^{n}\) is the state vector, \(\mathbf{u}\in\mathbb{R}^{m}\), is the control action with \(m<n\), and \(H(\mathbf{x}):\mathbb{R}^{n}\rightarrow\mathbb{R}\) is the total stored energy. The interconnection structure is captured in the skew-symmetric matrix \(\mathbf{J}(\mathbf{x})=-\mathbf{J}^{T}(\mathbf{x})\), and \(\mathbf{R}(\mathbf{x})=\mathbf{R}^{T}(\mathbf{x})\geq 0\) represents the dissipation; these matrices depend smoothly on the state \(\mathbf{x}\), and \(\mathbf{y}\in\mathbb{R}^{m}\) is the output vector, while \(\mathbf{g}(\mathbf{x})\) is the external interconnection port. These models can describe an extensive class of physical systems, and they can be used for PBC because they are well suited to carry out the basic steps of this methodology. The procedure design is described in the following proposition.  
**Proposition 1** ([22]).: _Consider a nonlinear system_  
\[\dot{\mathbf{x}}=\mathbf{f}(\mathbf{x})+\mathbf{g}(\mathbf{x})\mathbf{u}. \tag{3}\]  
_Assume there exist the matrices \(\mathbf{g}^{\perp}(\mathbf{x})\), \(\mathbf{J}_{d}(\mathbf{x})=-\mathbf{J}_{d}^{T}(\mathbf{x})\), \(\mathbf{R}_{d}(\mathbf{x})=\mathbf{R}_{d}^{T}(\mathbf{x})\geq\mathbf{0}\) and a function \(H_{d}:\mathbb{R}^{n}\rightarrow\mathbb{R}\) that verifies the partial differential equation (PDE)_  
\[\mathbf{g}^{\perp}(\mathbf{x})\mathbf{f}(\mathbf{x})=\mathbf{g}^{\perp}( \mathbf{x})[\mathbf{J}_{d}(\mathbf{x})-\mathbf{R}_{d}(\mathbf{x})]\
abla H_{d}, \tag{4}\]  
_where \(\mathbf{g}^{\perp}(\mathbf{x})\) is a full-rank left annihilator of \(\mathbf{g}(\mathbf{x})\) ( \(\mathbf{g}^{\perp}(\mathbf{x})\mathbf{g}(\mathbf{x})=\mathbf{0}\)), \(\
abla H_{d}\) denotes the gradient \(\frac{\partial H_{d}}{\partial\mathbf{x}}\) and \(H_{d}(\mathbf{x})\) is such that_  
\[\mathbf{x}^{*}=\arg\min H_{d}(\mathbf{x}), \tag{5}\]  
_with \(\mathbf{x}^{*}\in\mathbb{R}^{n}\) is the equilibrium point to be stabilized. Then, the closed-loop system (3) with the control_  
\[\mathbf{u}=\Big{[}\mathbf{g}^{\perp}(\mathbf{x})\mathbf{g}(\mathbf{x})\Big{]} ^{-1}\mathbf{g}^{\perp}(\mathbf{x})\{[\mathbf{J}_{d}(\mathbf{x})-\mathbf{R}_{ d}(\mathbf{x})]\
abla H_{d}-f(\mathbf{x})\}, \tag{6}\]  
_takes the PCH form_  
\[\dot{\mathbf{x}}=[\mathbf{J}_{d}(\mathbf{x})-\mathbf{R}_{d}(\mathbf{x})] \
abla H_{d}, \tag{7}\]  
_with \(\mathbf{x}_{*}\), a (locally) stable equilibrium. It will be asymptotically stable if, in addition, \(\mathbf{x}_{*}\) is the isolated minimum of \(H_{d}(\mathbf{x})\) and the largest invariant set under the closed-loop dynamics (7) contained in_  
\[\Big{\{}\mathbf{x}\in\mathbb{R}^{n}|[\
abla H_{d}]^{T}\mathbf{R}_{d}(\mathbf{ x})\
abla H_{d}=\mathbf{0}\Big{\}}, \tag{8}\]  
_equals \(\mathbf{x}_{*}\). An estimate of its domain of attraction is given by the largest bounded level set \(\{\mathbf{x}\in\mathbb{R}^{n}|H_{d}\leq c\}\) and \(c<\infty\)._  
**Remark 4**.: _It is important to point out that condition (8), besides being involved with stability properties, is related with robustness properties. This is due to the fact that matrix \(\mathbf{R}_{d}\) does not depend on the motor parameters. Then, as long as it is a positive definite, the stability properties will be achieved._