# An EV SRM Drive and Its Interconnected Operations Integrated into Grid, Microgrid, and Vehicle
## 4 G2V/V2G Operations
### Grid-Connected Three-Phase SMR/Inverter
#### 4.2.2 Control Scheme  
Figure 17 shows the control scheme of the 3P3W SMR/inverter in G2V charging and V2G discharging operations. The detailed controller parameters are introduced as follows.  
Figure 16: Schematic of developed three-phase SMR/inverter.  
1. G2V operation (1) Phase-locked loop controller The PLL controller is chosen to be PI type via trail-and-error as: \[G_{pll}(s)=K_{pllp}+\frac{K_{plli}}{s}=10+\frac{450}{s}\] (20) (2) Current controller The decoupling controller \(G_{dc}(s)\) and feedforward controller \(G_{ff}(s)\) are set as follows: \[G_{dc}(s)=\omega_{e}L/(K_{PWM}K_{i})\] (21) \[G_{ff}(s)=1/(K_{PWM}K_{v})\] (22) where \(K_{i}\) and \(K_{v}\) are current and voltage sensing factors, respectively. \(K_{PWM}=0.5\)\(V_{dc}/\hat{V}_{tri}\) is the PWM transfer ratio, where \(\hat{V}_{tri}\) is the amplitude of triangle carrier and \(L\) is the inductance of energy storage inductors.
2. G2V operation (1) Phase-locked loop controller The PLL controller is chosen to be PI type via trail-and-error as: \[G_{pll}(s)=K_{pllp}+\frac{K_{plli}}{s}=10+\frac{450}{s}\] (23) (24) Current controller The decoupling controller \(G_{dc}(s)\) and feedforward controller \(G_{ff}(s)\) are set as follows: \[G_{dc}(s)=\omega_{e}L/(K_{PWM}K_{i})\] (25) \[G_{ff}(s)=1/(K_{PWM}K_{v})\] (26)  
where \(K_{i}\) and \(K_{v}\) are current and voltage sensing factors, respectively. \(K_{PWM}=0.5\)\(V_{dc}/\hat{V}_{tri}\) is the PWM transfer ratio, where \(\hat{V}_{tri}\) is the amplitude of triangle carrier and \(L\) is the inductance of energy storage inductors.  
Figure 17: Control scheme of developed 3P3W SMR/inverter: (**a**) G2V operation; (**b**) V2G operation.  
By assuming the ideal feedforward and decoupling controls, the current closed-loop transfer function between \(i_{q}^{*}\) and \(i_{q}^{\prime}\) can be specified by a first-order transfer function with time constant \(\tau_{ir}\). Giving \(\tau_{ir}=0.5\) ms and using the known data, \(K_{i}=0.03\) V/A, \(L=2.5\) mH, \(r=88\) m\(\Omega\), and \(K_{PWM}=200\), one can find the current controller:  
\[G_{ci}(s)=0.833+\frac{29.333}{s} \tag{23}\]
3. Voltage feedback controller At the given operation point \((V_{dc}=400\) V, \(R_{dc}=160\)\(\Omega)\), the voltage regulation control specifications are defined as \((\Delta\sigma_{dm}=-10\) V and \(t_{re}=0.2\) s ). Due to the step power change, \(\Delta P_{dc}=300\) W \((R_{dc}=160\)\(\Omega\)\(\rightarrow\)\(123.07\)\(\Omega)\). Through careful derivation, one can find that: \[G_{cv}(s)=K_{pv}+\frac{K_{ir}}{s}=1.926+\frac{11.677}{s}\] (24)
2. V2G operation Figure 17b shows the control scheme of the 3P3W inverter in V2G operation. The PLL controller and current controller parameters are set the same as those in G2V mode. The q-axis current command \(i_{q}^{*}\) and d-axis current command \(i_{d}^{*}\) can be obtained through the current command generator depending on the real power command \(P_{o}^{*}\) and reactive power command \(Q_{o}^{*}\). Generally, \(i_{d}=0\) is set to reach a unity power factor.