top of page
Search

# MATLAB Simulation of V2G and G2V operation with Three Phase Grid

MATLAB Simulation of V2G and G2V operation with Three Phase Grid

We will explore vehicle-to-grid (V2G) and grid-to-vehicle (G2V) operations using a three-phase grid. We have developed a simulation model to demonstrate this concept.

Simulation Model Overview

Our model consists of:

An electric vehicle (EV) battery

A DC-AC converter

A harmonic filter (LCL filter)

A three-phase grid

A DC-DC converter or inverter

The model is controlled using a feed-forward decoupling control concept. We measure the grid voltage to generate the phase angle with respect to time (omega t) and convert the grid voltage from ABC form to DQ0 form using Park transformation.

Components and Control Strategy

Grid Voltage Measurement and Transformation:

Convert grid voltage (ABC form) to DQ0 form using Park transformation.

Measure inverter current and convert it from ABC form to DQ0 form to get the actual direct and quadrature axis currents (Id and Iq).

Reference Current Generation:

Provide a reference power for V2G or G2V operation.

Convert reference power to reference current (Id reference) using a specific conversion formula.

Set the reference current for Iq to zero to control only the real power.

Control Signal Processing:

Compare Id reference with the actual Id and Iq currents.

Process the difference using a PI controller to get control signals in D and Q forms.

Apply feed-forward decoupling and convert the final control signals back to ABC form using inverse Park transformation.

Use the PWM generator to produce pulses for the three-phase inverter, controlling the system based on the reference power provided.

Measurements and Observations

Active and Reactive Power:

Measure the inverter and grid active and reactive power.

Monitor the phase voltage and inverter current to observe the phase angle difference.

Battery Parameters:

Measure the battery voltage, current, and state of charge (SOC).

Simulation Results

Vehicle-to-Grid Operation

Reference power is set to 5 kW, indicating that the vehicle battery supplies power to the grid.

Observations:

The battery voltage is maintained at 1000V, and the current is 5A, resulting in 5000W power.

The inverter and grid power both show 5000W.

Reactive power from the grid is 2000VAR, used by the harmonic filter.

The phase angle between voltage and current is zero (in phase).

Grid-to-Vehicle Operation

Reference power is set to -5 kW, indicating that the grid supplies power to charge the vehicle battery.

Observations:

The inverter and grid power are -5000W.

The battery current is -5A, and the SOC of the battery increases.

The phase angle between voltage and current is 180 degrees (out of phase).

Transition Between Modes

Use a step input to change from V2G to G2V operation and observe the system's response.

At 1 second, the reference power changes from 5 kW to -5 kW.

Observations:

Power of the inverter and grid changes from +5000W to -5000W.

Battery current changes from 5A to -5A.

Phase angle shifts from in phase to 180 degrees out of phase.

Conclusion

This simulation demonstrates the functionality and control of a V2G and G2V system using a three-phase grid. The results show the successful operation of the system in both modes and the seamless transition between them.