MATLAB Simulation of V2G, G2V Operation in Electric Vehicle Charger (3 Phase Model). — Transcript
Full transcript
- 0:00[Music]
- 0:12our today's discussion is on matlab
- 0:14simulation of a bi-directional circuit
- 0:16used to charge the battery from the grid
- 0:18and discharges the battery to the grid
- 0:20this model can also be used as a
- 0:22demonstration of v2g and g2b operation
- 0:24in the electric vehicle
- 0:27this is the basic circuit topology of a
- 0:29three-phase electric vehicle battery
- 0:31charger
- 0:32at the input we have a front-end
- 0:34converter also known as active rectifier
- 0:36which converts the ac grid voltage to dc
- 0:38and maintains a constant voltage across
- 0:40the dc bus
- 0:42then we have a bi-directional bug boost
- 0:44converter used to control the battery
- 0:45current during charging and discharging
- 0:47operation
- 0:49now i will give you the specification of
- 0:51the complete system
- 0:52grid voltage 415 line to line rms at 50
- 0:56hertz
- 0:57the filter inductance is 3 milli henry
- 0:59and capacitance is 30 microfarad
- 1:02in the inverter bridge i used igbts
- 1:05value of bus capacitance is 5600
- 1:07microfarad mosfet is used in the buck
- 1:10converter
- 1:11bug filter inductance is 20 ml henry
- 1:14output capacitance is 0.625 microfarad
- 1:18battery nominal voltage is 360.
- 1:21switching frequency of both the
- 1:22converter is 10 kilohertz
- 1:24total rated power is 10 kilowatt
- 1:27now i will show you the control block
- 1:28diagram used in both the front end
- 1:30converter and bi-directional bug boost
- 1:32converter
- 1:34this is the control block diagram of the
- 1:36three-phase front-end converter
- 1:38this controller is used to regulate 800
- 1:40volt dc across the bus
- 1:43this is the control block diagram used
- 1:45in the bi-directional bug boost
- 1:47converter
- 1:48this controller is used to regulate the
- 1:50battery charging and discharging current
- 1:53now we open the math lab and start doing
- 1:55the simulation
- 2:00add a three-phase voltage source
- 2:02the source we are using is the grid
- 2:07set phase to phase voltage 415
- 2:12frequency 50 hertz
- 2:16set source resistance and inductance
- 2:17very small values
- 2:22and base voltage 415
- 2:26add a three-phase voltage current
- 2:27measurement block
- 2:35here i am measuring face to ground
- 2:36voltage using label vabc and i am not
- 2:39measuring the current
- 2:44connect this block to the voltage source
- 2:52now we start connecting the lcl filter
- 2:55add a series rlc branch
- 3:01make it as inductance and set the value
- 3:035 millihenry
- 3:10connect the inductor in all the three
- 3:12phases
- 3:21copy this block
- 3:23make this branch as capacitor and set
- 3:25the value 30 microfarad
- 3:37connect the capacitor in all the three
- 3:39phases
- 3:46now connect the inverter side filter
- 3:48inductor
- 3:55now add a current measurement block to
- 3:57measure the inverter current
- 4:03change its direction
- 4:09and also flip the block up down
- 4:17connect this in all the phases
- 4:25add a go to block
- 4:29change its direction
- 4:34give the tag name ir
- 4:43similarly connect i y and ib
- 5:03connect the go to tags into the current
- 5:05measurement block
- 5:14now we create the three-phase bridge
- 5:16using igbts
- 5:20uncheck this box
- 5:34adder import
- 5:37connect to the gate terminal
- 5:41name it as pwm1
- 5:46similarly connect to all the other gate
- 5:48terminals
- 5:49make sure that the name on the port
- 5:51appears correctly from pwm1 to pwm6
- 6:09now add a connection port
- 6:16keep the port location left
- 6:22name it as vr
- 6:28similarly connect vy and vb and change
- 6:31the port name also
- 6:43keep the alignment left for both
- 6:50now connect the port across the dc
- 6:51terminals
- 7:04keep its alignment right
- 7:12name it as vdc plus
- 7:19keep this alignment also right
- 7:24and name this 1vdc minus
- 7:30now add a series rlc branch
- 7:35this is the dc bus capacitance and its
- 7:37series resistance
- 7:48set the resistance 1 milli ohm and
- 7:49capacitance 5600 microfarad
- 7:55and set initial voltage 800
- 8:04create subsystem from the selection
- 8:08and delete all unwanted connections
- 8:37now connect the three-phase bridge to
- 8:39the lcl filter
- 8:55now add up from block and connect it as
- 8:57pwm1
- 9:13similarly connect all the 6 pwm signals
- 10:20now add a voltage measurement block
- 10:22this is used to measure the dc bus
- 10:24voltage
- 10:32add a go to block
- 10:40name it as vdc
- 10:43add a mosfet and make the bug converter
- 10:51uncheck this box
- 11:15add a series rlc branch
- 11:23set the resistance
- 11:250.0001 and inductance 20 milli henry
- 11:39copy the rlc branch
- 11:49here set the resistance
- 11:510.0001 and capacitance 0.625 microfarad
- 12:05now add a from blog
- 12:14name it as bug
- 12:20connected to the gate terminal
- 12:25and similarly connect it to the other
- 12:26gate terminal and name it as boost
- 12:35now connect the battery
- 12:42set nominal voltage 360 rated capacity
- 12:45300 ah initial soc 50 and response time
- 12:49one second
- 12:58flip the battery block left right
- 13:13now add a bus selector
- 13:26add soc voltage and current into the bus
- 13:37add a go to blog
- 13:42name it as soc
- 13:48and similarly connect the battery
- 13:50voltage and current at the output of bus
- 13:52selector
- 14:10name it as ibat
- 14:16and name this one v-bat
- 14:22now we start connecting the inverter
- 14:23controller blocks
- 14:25first adder from blog
- 14:33name it as vabc which is same as the
- 14:35grid voltage
- 14:38add a abc to alpha beta block
- 14:45add alpha beta to dq block
- 14:54add another from block
- 15:05name it as omega t
- 15:07where omega t is the output of pll
- 15:12add a dmx
- 15:20now add a go to block
- 15:31name it as vd
- 15:35and this 1vq
- 15:40copy this from blog
- 15:57name this one alpha beta and this signal
- 15:59will be used as the input to pll
- 16:04now we connect the current
- 16:05transformation blocks take all the three
- 16:08current signals
- 16:28add a marks
- 16:33make number of inputs 3
- 16:41add abc to dq transformation block
- 17:03make number of outputs three
- 17:07this one also need to make three
- 17:14copy these from blocks
- 17:26name it as id
- 17:31and name it as iq
- 17:35now we connect the pll blocks
- 17:45add alpha beta to dq block
- 17:54copy this demux
- 17:59add a sum blog
- 18:09make it sign minus plus
- 18:18add a constant
- 18:24set the value zero
- 18:29at apid controller
- 18:37make the controller pi and set kpki
- 18:39values
- 18:53add an integrator
- 19:02this is the output of pll and this has
- 19:04to go to the other transformation blocks
- 19:13now we start connecting the dc bus
- 19:15voltage controller
- 19:17add a constant block
- 19:24the reference voltage 800
- 19:30add a sum block
- 19:38the sine plus minus
- 19:43take the voltage signal and connect to
- 19:45the sum block
- 19:48add apid controller
- 19:56make the controller pi
- 19:59set kp 0.5 and ki5
- 20:08copy the sum block and pid controller
- 20:24here give kps 25 and ki 500
- 20:36here change the sign to plus
- 20:41add a game block
- 20:52give its value 2 into pi into 50 into 10
- 20:54e rise to minus 3.
- 21:07connect iq to the game block
- 21:27change its name to vd
- 21:34add another gain block
- 21:40set the value to
- 21:43add a product blog
- 21:51change the number of inputs
- 21:55connect dc voltage to the product block
- 22:03now to make you access current
- 22:04controller copy and paste all these
- 22:06blocks
- 22:22add a constant block
- 22:28set the current reference as 0
- 22:34copy this block
- 22:43rename this to id
- 22:50and rename this to vq
- 22:57change it sign to plus minus
- 23:02now we start making the battery current
- 23:04controller
- 23:05adder from block
- 23:13select ibat from the drop-down list
- 23:20add sum block
- 23:26change sine plus minus
- 23:32add a constant block
- 23:38set the battery current reference 30
- 23:43add apid controller
- 23:52make the controller pi
- 23:54set kp 0.005 and ki-10
- 24:00limit the output between 0 and 0.95
- 24:09add a dc-dcpwm generator
- 24:16set switching frequency 10 kilohertz
- 24:22now connect the output of pwm block to
- 24:24the respective gate terminals of the
- 24:25mosfet
- 24:29add a logical operator
- 24:34select not from the list
- 24:44now add a mux
- 24:49make number of inputs 3
- 24:52connect the controller outputs to the
- 24:58mux add a dq to abc transformation block
- 25:10copy the pll output and connect to this
- 25:12block
- 25:17add a two level pwm generator
- 25:27set switching frequency 10 kilohertz
- 25:38added mix
- 25:44set number of output 6.
- 25:55now connect these outputs to the
- 25:56respective pwm signals of the inverter
- 26:32now add a power measurement block
- 26:44add grid voltage and current to this
- 26:46block
- 27:08add a scope
- 27:15open the scope settings
- 27:19change number of inputs and layout in
- 27:21the scope settings
- 27:31connect the grid voltage and current to
- 27:32the scope
- 27:40add another scope to view the dc bus
- 27:41voltage
- 28:03add displays to view the active and
- 28:05reactive power taken from the grid
- 28:20now open the configuration settings
- 28:26set solver type or de23t
- 28:33add a power ghee block
- 28:39set simulation type discrete and
- 28:41sampling time 1 micro seconds
- 28:48here i made a mistake in the connection
- 28:50so i will correct it now
- 28:56now set simulation time one second and
- 28:58run the simulation
- 29:17here you can see that the active power
- 29:19is positive which means that the power
- 29:20flow is from the battery to the grid
- 29:23so the system is working in the v2g mode
- 29:27now let's wait to run the simulation
- 29:29100.
- 29:42now i will show you the voltage and
- 29:43current waveforms
- 29:54as you see both the voltage and current
- 29:55are aligned in phase
- 29:57which means we are injecting the power
- 29:59into the
- 30:06grid this is the dc bus voltage during
- 30:09v2g operation
- 30:18now to make the system work in the g2v
- 30:20mode that is charging the battery from
- 30:21the grid we need to make the current
- 30:23reference negative
- 30:28now again run the simulation
- 30:54this is the voltage and current during
- 30:55g2v mode
- 31:00as you see both the voltage and current
- 31:02are aligned out of phase
- 31:04which means power is taken from the grid
- 31:09this is the bus voltage during g2v mode
- 31:13and here you can see that the power is
- 31:15negative which means power is taken from
- 31:17the grid to charge the battery
- 31:20this is the end of this presentation
- 31:22thanks for watching
- 31:33you
About this transcript
This page contains the full transcript of MATLAB Simulation of V2G, G2V Operation in Electric Vehicle Charger (3 Phase Model). by Tech Simulator, generated from the public captions YouTube serves with the video. The transcript has 1,590 words across 313 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.