## 6 Real-Time In-Vivo and In-Vitro Corrosion Monitoring
### Electrochemical-Based Monitoring System  
The electrochemical-based monitoring system typically analyzes the behavior of the analyte during the corrosion process of the metal. [4]. Normally, a metal would be placed in an aggressive environment, inducing corrosion products to form. If the environment is an electrolyte, two processes would occur, one of which is an anodic process; where the metal undergoes oxidation and the other of which is a cathodic process; where a reduction reaction would occur such as oxide or hydroxide ion reduction. The cations and anions will move in opposite directions, resulting in an electric current being generated within the metal [25]. The electric current can then be transformed and measured as electric potential (voltage). One way of measuring voltage is by setting up three electrodes namely, the working electrode, reference electrode, and counter electrode immersed in the electrolyte; this results in an amperometric sensor circuit (Figure 5a) [4]. The application of three electrodes allows a more precise measurement outcome, usually achieved by passing little or no current through the reference electrode [26]. Another option of measuring voltage is to have an electrochemical cell connected to a potentiostat, also known as the potentiostat circuit (Figure 5b) [4]. Figure 4: Production of numerous corrosion products in a physiological environment [8]. [PERSON] et al. [27] adopted this method when conducting research into the vascular bioreactor (Figure 5b) in order to examine the corrosion of the Mg metal alloy in real-time. Since the material was used for constructing vascular stents due to its in-vivo potential, the experimental set-up of the vascular bioreactor consisted of Tygon tubing as a channel for testing, the electrolyte, Dulbecco's modified Eagle's medium (DMEM), a flow pump for varying the flow rate, a reservoir, and an incubator. This set-up mimics actual physiological conditions that would be encountered in blood vessels. The potentiostat used in this experiment performs electrochemical impedance spectroscopy (EIS), open circuit potential (OCP), and linear polarization measurement (LPM). To differentiate their study from other Mg electrochemical studies, the approach taken was to observe the corrosion mechanism of Mg affected by forces exerted from fluids in a real-time scenario. This is because, in this type of environment, a more reliable result is obtained from the in-situ data. It can be concluded that in order to determine corrosion in the long term, EIS is a suitable and non-harmful candidate that allows continuous monitoring. In addition, the EIS can provide quantitative data of the corrosion process at the interface of the electrolyte-electrode along with any changes in electrode. Corrosion characterization system (CCS) is also another approach adopted from electrochemical-based principles. [PERSON] et al. managed to create a CCS that allows monitoring in real-time by analyzing the soluble corrosion products such as OH\({}^{-}\), Mg\({}^{2+}\), and H\({}_{2}\) in the solution during immersion tests [28]. Their study involved combining several methods to monitor the corrosion of Mg continuously in real-time during immersion tests (Figure 6). The real-time methods that they used involved using a glass pH electrode, a water hardness ion-selective electrode (ISE) and a platinum disk sensor to continuously measure the concentration of hydroxide ions, magnesium ions and dissolved hydrogen, respectively. Very small implantable sensors such as an Mg ion selective electrode can be fabricated by infusing an ionophore with a selectivity towards Mg ions in a liquid membrane [29]. The simultaneous usage of multiple electrochemical sensors for measuring corrosion products in a solution is one of the attractive features of CCS. Furthermore, CCS can also evaluate whether protection from corrosion in the form of coatings formed on the surface reduces the rate of corrosion of the metal.