# The Application of an Impedance-Passivity Controller in Haptic Stability Analysis
## 3 Planning and Design of Impedance-Passivity Controller (IPC)  
### Passivity Theorem  
The passivity theorem is a stability analysis method based on the concept of energy dissipation, which can be applied to the stability analysis of nonlinear systems [24]. The initial concept is based on the concept of circuitry, which is used in conjunction with the concept of a single-port network to discuss the energy relationship between the inflow and outflow of a system. As opposed to the definition of a circuit system, where current is the equivalent of voltage, passivity here means dissipation. In a simple circuit system with simple resistance and an applied voltage, the whole system consumes energy continuously and does not generate energy of its own. Such a circuit can be considered a circuit system possessing passivity. Energy dissipation is defined as follows.  
**Definition 1**.: _The system will be a passive system because of the initial energy of the single-port network, which is expressed as_  
\[\int_{0}^{t}f(\tau)v(\tau)d\tau+E(0)\geq 0,\ \forall t\geq 0, \tag{1}\]  
_where f is force (N)._  
**Definition 2**.: _In a discrete-time system, if the system is a passive system at sampling time \(\Delta T\), then the system has an initial energy \(E(0)\), which is expressed as_  
\[\Delta T\sum_{k=0}^{n}f(k)v(k)+E(0)\geq 0,\forall n\geq 0. \tag{2}\]  
In a haptic-feedback-based augmented reality system, the interactive mode has a two-port network architecture, as shown in Figure 2. The system mainly consists of a human operator with a mechanical robot, a haptic device, an IPC and VE. Here, \(f_{h}\) is the force exerted by the operator, \(v_{h}\) is the operating speed, \(v_{e}\) is the speed of device movement in the VE, \(f_{e}\) is the applied force from the VE, \(\alpha\) is the impedance-passivity controller (IPC), \(f_{c}\) is the combined force between the controller compensation and VE, and \(E_{obsv}\) is the system energy estimator.  
Figure 1: Framework of the impedance-passivity controller.  
According to the definition of passivity theorem, \(\forall n\geq 0\):  
\[E_{obsv}(n)=\Delta T\sum_{k=0}^{n}f_{e}(k)v_{e}(k)+\Delta T\sum_{k=0}^{n-1} \alpha(k)v_{e}{}^{2}(k). \tag{3}\]  
By presenting the last term of (3), the general formula for calculating the energy of a virtual environment can be obtained, as shown in (4):  
\[E_{obsv}(n)=E_{obsv}(n-1)+[f_{e}(n)v_{e}(n)+\alpha(n-1)v_{e}(n-1)^{2}big]\Delta T \tag{4}\]  
In accordance with definition 2, the controller design equation can be obtained:  
\[\alpha(n)=\left\{\begin{array}{l}-\frac{1}{\Delta Tv_{e}^{2}}E_{obsv}(n),~{ }ifE_{obsv}(n)<0\\ 0,~{}~{}~{}~{}ifE_{obsv}(n)>0\end{array}\right. \tag{5}\]  
In this study, the \(\alpha\) controller represents the physical meaning of an energy-expendable component that consumes the excess energy generated in the system, as shown in Figure 3. Then, Figure 3 is a schematic diagram of a virtual wall, where \(B\) and \(K\) are the damping and spring coefficient, respectively. Then \(\alpha\) plays the role of a control parameter as described above.  
Figure 3: Schematic diagram of a virtual wall.  
Figure 2: Block diagram of haptic feedback based augmented reality.  
**Definition 3**.: _For the sampling data system in Figure 1, the system must dissipate energy if and only if the device and virtual environment parameters meet the following inequalities:_  
\[b>\frac{T}{2}\frac{1}{1-coswT}\mathrm{Re}\big{\{}\big{(}1-e^{-jwT}\big{)}E\big{(} e^{jwT}\big{)}\big{\}},0\leq w\leq w_{N} \tag{6}\]  
_where the sampling time is \(T\), \(w\), and \(b\) are the system resonance frequency and damping coefficient of haptic device, respectively. Finally, \(w_{N}=\pi/T\) is the Nyquist frequency._