Experiment 1
Simulation and Analysis of a DC–DC Boost Converter with Closed-Loop PI Control
Aim
To design and simulate a closed-loop DC–DC Boost Converter in MATLAB/Simulink to step up a 12 V DC input to a
regulated 24 V DC output using a Proportional–Integral (PI) controller and Pulse Width Modulation (PWM).
Theory
A DC–DC Boost Converter is a power electronic converter used to increase the input DC voltage to a higher regulated
output voltage.
The converter mainly consists of:
• Inductor
• Diode
• Switch (IGBT/MOSFET)
• Capacitor
• Load Resistance
The working principle is based on energy storage in the inductor.
Working Operation
Mode 1: Switch ON
• The IGBT turns ON.
• The diode becomes reverse biased.
• Energy is stored in the inductor.
Mode 2: Switch OFF
• The IGBT turns OFF.
• The inductor releases stored energy.
• Energy flows through diode to capacitor and load.
• Output voltage becomes greater than input voltage.
Governing Equation
For an ideal boost converter:
Vout= Vin/1-D
Where:
• Vout= Output Voltage
• Vin= Input Voltage
• D = Duty Cycle
Given:
Vin = 12V
Vref = 24V
24 = 12/1-D
1-D = 0.5
D = 0.5
Thus, the theoretical duty cycle required is 50%.
Procedure
1. Open MATLAB and create a new Simulink model.
2. Add Simscape Electrical components.
3. Construct the boost converter power circuit using:
o DC source
o Inductor
o IGBT
o Diode
o Capacitor
o Load resistor
4. Add Voltage Sensor for output feedback.
5. Use PS-Simulink Converter to convert physical signal into Simulink signal.
6. Add Constant block with value 24 V as reference voltage.
7. Connect Sum block to calculate error signal.
8. Add PI Controller to process error.
9. Add Saturation block to limit duty cycle.
10. Connect PWM Generator.
11. Use Simulink-PS Converter to drive IGBT gate.
12. Configure solver settings.
13. Run simulation.
14. Observe output voltage and PWM waveform using Scope.
Observation
• Input voltage was maintained at 12 V.
• Output voltage increased and stabilized near 24 V.
• PWM duty cycle adjusted automatically.
• PI controller reduced steady-state error.
Result
The DC–DC Boost Converter with closed-loop PI control was successfully designed and simulated.
The converter boosted the 12 V input supply to approximately 24 V output using PWM switching and PI controller.
Conclusion
The closed-loop boost converter achieved voltage regulation by continuously adjusting the duty cycle through PI
control.
The feedback mechanism improved stability and reduced output voltage variation.
The simulation validated the theoretical relationship between duty cycle and output voltage.
Precautions
• Ensure correct polarity of diode and capacitor.
• Use proper grounding.
• Set saturation limits to avoid duty cycle overflow.
• Keep PWM frequency sufficiently high.
• Verify correct feedback signal connection.
Applications
• Electric Vehicles
• Solar Power Systems
• Battery Charging Systems
• DC Motor Drives
• Renewable Energy Systems
Experiment 2
Simulation of On-Board Charger (OBC) for Electric Vehicle
Aim
To design and simulate an On-Board Charger (OBC) for a two-wheeler electric vehicle in MATLAB/Simulink and
observe charging parameters such as DC bus voltage, charging current, battery voltage, and State of Charge (SOC).
Theory
An On-Board Charger (OBC) is an essential subsystem in electric vehicles that converts AC power from the utility grid
into regulated DC power required for charging the battery.
The OBC mainly consists of two conversion stages:
1. AC–DC Conversion Stage (Totem Pole Power Factor Correction Converter)
2. DC–DC Isolated Conversion Stage (Full Bridge Converter)
The charger draws AC power from the grid and converts it into a regulated DC output suitable for battery charging.
Working Principle
Stage 1: AC Input Supply
• AC voltage from the utility grid is supplied to the charger.
• Input supply specification:
o Voltage = 230 V AC
o Frequency = 50 Hz
Stage 2: Totem Pole Converter
• Converts AC to DC.
• Shapes input current waveform to follow supply voltage waveform.
• Generates a regulated DC bus voltage.
Stage 3: DC Link Stage
• A DC bus capacitor smooths rectified voltage.
• Bus voltage is regulated around 400 V.
Stage 4: Isolated Full Bridge Converter
• Converts DC bus voltage to controlled battery charging voltage.
• Provides galvanic isolation.
• Controls charging current.
Stage 5: Battery
• The converter supplies constant charging current.
• Battery voltage gradually increases.
• State of Charge (SOC) increases with time.
System Specifications
Parameter Value
Input Voltage 230 V AC
Frequency 50 Hz
Parameter Value
Charger Power 1 kW
DC Bus Voltage 400 V
Battery Voltage 60 V
Battery Capacity 50 Ah
Charging Current 16.67 A
Governing Equations
Power Equation
P=VI
For battery charging:
P = 608 * 16.67
P = 1000W (approx.)
This confirms the charger rating of 1 kW.
Simulink Model Description
The complete OBC model is divided into two major sections.
1. AC–DC Conversion Stage
Contains:
• AC Voltage Source
• Totem Pole Converter
• Input Inductor
• Switching Devices
• DC Bus Capacitor
Purpose:
• Rectification
• Power Factor Correction
• DC Bus Regulation
2. DC–DC Conversion Stage
Contains:
• Full Bridge Converter
• Transformer Isolation
• Output Rectifier
• Filter Capacitor
• Battery Load
Purpose:
• Voltage Conversion
• Current Control
• Battery Charging
Simulink Blocks Used
Block Function
AC Voltage Source Grid Supply
Universal Bridge Switching Converter
Inductor Energy Storage
Capacitor Voltage Smoothing
Block Function
PWM Generator Switching Pulses
Battery Block Battery Model
Voltage Measurement Voltage Monitoring
Current Measurement Current Monitoring
Scope Output Waveforms
Powergui Specialized Power Systems Simulation
Procedure
1. Open MATLAB and create a new Simulink model.
2. Add AC Voltage Source block.
3. Construct Totem Pole Converter stage.
4. Add DC Bus capacitor.
5. Create isolated DC–DC full bridge converter.
6. Connect battery block.
7. Add current and voltage measurement blocks.
8. Configure PWM control for switching devices.
9. Set system specifications.
10. Add Scope blocks.
11. Configure simulation solver.
12. Run simulation.
13. Observe output waveforms.
Simulation Parameters
Parameter Value
Input Voltage 230 V
Frequency 50 Hz
Parameter Value
Bus Voltage 400 V
Battery Voltage 60 V
Charging Current 16.67 A
Simulation Time 0.5 s
Solver ode23t
Output Waveforms
1. DC Bus Voltage
• Approximately 400 V.
• Small ripple present.
2. Grid Voltage and Current
• Sinusoidal waveform.
• Near unity power factor.
3. Battery Voltage
• Around 60 V.
• Gradually increases.
4. Charging Current
• Maintained near 16.67 A.
5. State of Charge (SOC)
• Increases continuously during charging.
Result
• The On-Board Charger system successfully converted AC input power into regulated DC power suitable for EV
battery charging.
• The DC bus voltage remained near 400 V while charging current stayed approximately 16.67 A.
• The battery State of Charge increased continuously.
Conclusion
• The On-Board Charger model successfully demonstrated AC–DC and DC–DC power conversion required for
EV charging.
• The Totem Pole Converter maintained power factor correction and generated a stable DC bus voltage.
• The isolated full bridge converter regulated charging current and safely charged the battery.
• The simulation confirmed stable charger operation.
Experiment 3
Dual Active Bridge (DAB) DC–DC Converter
Aim
To study and control the output voltage of a Dual Active Bridge (DAB) DC–DC converter using phase shift control in
MATLAB/Simulink.
Objectives
• To understand bidirectional DC–DC converter operation.
• To analyze voltage regulation using phase shift modulation.
• To observe system response to change in reference voltage.
• To study transformer-isolated power transfer between two DC sources.
Theory
A Dual Active Bridge (DAB) DC–DC converter is an isolated bidirectional converter used for efficient energy transfer
between two DC systems.
The DAB converter consists of:
• Primary full bridge converter
• High-frequency transformer
• Secondary full bridge converter
• Leakage inductance
• Control system based on phase shift
Unlike conventional DC–DC converters, both bridges are active. This enables bidirectional power flow.
The transformer provides:
• Electrical isolation
• Voltage scaling
• Safe power transfer
The converter is widely used in:
• Electric vehicles
• Battery charging systems
• Renewable energy systems
• DC microgrids
• Energy storage systems
Working Principle
The operation of the DAB converter occurs in the following sequence.
Step 1: Primary Bridge Switching
• Input DC voltage is converted into high-frequency AC.
• The primary bridge generates square-wave voltage.
Step 2: Transformer Energy Transfer
• High-frequency AC passes through transformer.
• Leakage inductance controls power transfer.
Step 3: Secondary Bridge Operation
• Secondary bridge converts transformer voltage back into DC.
• Output voltage is delivered to load.
Step 4: Phase Shift Control
• Both bridges operate at 50% duty cycle.
• A phase shift is introduced between bridges.
• Power transfer depends on phase difference.
When phase shift increases:
• Power transfer increases.
• Output voltage increases.
When phase shift decreases:
• Power transfer decreases.
• Output voltage decreases.
Power Transfer Relation
The transferred power in DAB converter is proportional to:
P ∝ Vin Vout Φ/ L
Where:
• Vin = Input Voltage
• Vout = Output Voltage
• Φ = Phase Shift Angle
• L = Leakage Inductance
This equation shows that output voltage can be regulated by varying phase shift.
System Specifications
Parameter Value
Input Voltage 60 V
Initial Reference Voltage 20 V
Final Reference Voltage 30 V
Reference Change Time 0.15 s
Duty Cycle 50%
Converter Type Bidirectional
Switching Method Phase Shift Control
Simulink Model Description
The DAB converter model consists of three main sections.
1. Primary Side Full Bridge
Contains:
• DC Voltage Source
• Four MOSFET/IGBT switches
• PWM switching logic
Purpose:
• Convert DC to high-frequency AC.
2. High-Frequency Transformer
Contains:
• Transformer block
• Leakage inductance
Purpose:
• Provide isolation.
• Transfer energy.
• Scale voltage.
3. Secondary Side Full Bridge
Contains:
• Controlled switching bridge
• Output filter
• Load
Purpose:
• Convert AC back to regulated DC.
Procedure
1. Open MATLAB and create a new Simulink model.
2. Add DC voltage source block.
3. Create primary full bridge converter.
4. Add high-frequency transformer.
5. Add leakage inductance.
6. Construct secondary bridge converter.
7. Add output capacitor and load resistor.
8. Add voltage measurement block.
9. Implement phase shift controller.
10. Set initial reference voltage to 20 V.
11. Increase reference voltage to 30 V at t = 0.15 s.
12. Configure simulation parameters.
13. Run simulation.
14. Observe output response.
Control Operation
The controller continuously compares:
Error = Vref – Vout
The error signal is processed through a controller.
The controller adjusts:
• Phase shift angle
• Power transfer
• Output voltage
Observations
• Input voltage remains constant at 60 V.
• Output voltage initially stabilizes at 20 V.
• Reference voltage changes to 30 V at 0.15 s.
• Output voltage tracks the new reference.
• Small transient response occurs during switching.
• Oscillations remain minimal.
• Stable steady-state operation is achieved.
Output Waveforms
1. Input Voltage
• Constant at approximately 60 V.
2. Output Voltage
• Initially regulated at 20 V.
• Rises to 30 V after reference change.
3. Phase Shift Response
• Phase difference changes dynamically.
• Controls power transfer.
4. Transient Response
• Small overshoot observed.
• Fast stabilization achieved.
Result
• The Dual Active Bridge converter successfully regulated the output voltage using phase shift control.
• The converter maintained constant input voltage and tracked reference voltage changes effectively.
• The system demonstrated stable operation with controlled bidirectional energy transfer.
Conclusion
• The Dual Active Bridge converter is an efficient isolated DC–DC converter suitable for high-power
applications.
• Phase shift control enables accurate voltage regulation and bidirectional power flow.
• The converter demonstrated good transient response and stable operation.
• The simulation verified that the output voltage accurately follows the reference value.
Experiment 4
Simulation of Charging and Discharging Control of an EV Battery Using Simulink
Aim
To design and simulate a charging and discharging control system for an electric vehicle (EV) battery using
MATLAB/Simulink and a MATLAB Function block.
Objectives
• To implement charging and discharging logic using a MATLAB Function block.
• To simulate State of Charge (SOC) variation.
• To control motor operation based on battery condition.
• To understand battery mode switching in an EV system.
Theory
In an Electric Vehicle (EV), the battery operates in two primary modes:
1. Charging Mode
• Battery receives power from an external charging source.
• Battery current becomes negative.
• State of Charge (SOC) increases.
2. Discharging Mode
• Battery supplies energy to the electric motor.
• Battery current becomes positive.
• State of Charge (SOC) decreases.
The battery current determines the operating mode.
• Ibatt > 0 → Discharging
• Ibatt < 0 → Charging
The charging and discharging control logic depends on:
• Battery SOC
• Plug connection status
• Drive command
State of Charge Equation
The State of Charge is calculated using:
SOC = SOCinitial - 1\C ∫ Ibatt dt
Where:
• SOC = Battery State of Charge
• SOCinitial = Initial battery SOC
• Ibatt = Battery current
• C = Battery capacity
Working Principle
Charging Operation
• When the battery is plugged into charging source.
• SOC is below maximum limit.
• Battery enters charging mode.
• Charging current flows into battery.
Discharging Operation
• When drive command is enabled.
• SOC is above minimum limit.
• Battery powers motor.
• SOC decreases over time.
MATLAB Function Logic
function [Ibatt, mode] = control(soc, plugged, drive_cmd)
SOC_MAX = 0.9;
SOC_MIN = 0.2;
Ibatt = 0;
mode = 0;
if plugged == 1 && soc < SOC_MAX
Ibatt = -20;
mode = 0;
elseif drive_cmd == 1 && soc > SOC_MIN
Ibatt = 30;
mode = 1;
else
Ibatt = 0;
mode = 0;
end
end
Procedure
1. Open MATLAB and create a new Simulink model.
2. Add MATLAB Function block.
3. Implement charging/discharging logic.
4. Add integrator block for SOC calculation.
5. Add gain block representing battery capacity.
6. Add switch block.
7. Add motor transfer function.
8. Add constant blocks for plug status and drive command.
9. Connect scopes.
10. Configure simulation settings.
11. Run simulation.
12. Observe SOC and motor response.
Observations
Charging Mode
• Battery current becomes negative.
• SOC increases gradually.
• Motor remains OFF.
Discharging Mode
• Battery current becomes positive.
• SOC decreases gradually.
• Motor operates.
Mode Switching
• Automatic switching occurs.
• Battery follows logical conditions.
Output Waveforms
1. Battery Current
• Positive current indicates discharging.
• Negative current indicates charging.
• The current alternates between charging and
discharging cycles.
2. Battery Voltage
• Voltage increases during charging.
• Voltage decreases during discharging.
• Voltage remains within operating range of the battery.
3. Battery Temperature
• Temperature changes slightly during operation.
• Temperature rises during active charging/discharging periods.
• Temperature stabilizes during idle intervals.
4. State of Charge (SOC)
• SOC increases during charging periods.
• SOC decreases during discharging periods.
• The SOC remains within safe operating limits.
• The waveform shows periodic charging and discharging cycles of the battery
Result
The battery charging and discharging system was successfully simulated. The model automatically switched between
charging and discharging modes based on control conditions. Positive current represented discharging while negative
current represented charging. Battery voltage and temperature variations were observed during operation.
Conclusion
The simulation demonstrated charging and discharging control of an EV battery using Simulink. The model
successfully alternated between charging and discharging operation. Battery current, voltage, and temperature
behavior were analyzed. The system provides a basic understanding of EV battery management logic.
Advantages
• Simple implementation
• Easy SOC monitoring
• Flexible control logic
• Real-time decision making
Limitations
• Battery chemistry effects ignored.
• Thermal behavior not modeled.
• Internal battery resistance neglected.
• Simplified motor representation.
Experiment 5
PMSM Vector Control (Field-Oriented Control)
Aim
To study and simulate Vector Control (Field-Oriented Control) of a Permanent Magnet Synchronous Motor (PMSM)
and observe speed, torque, and current responses.
Theory
Introduction
A Permanent Magnet Synchronous Motor (PMSM) is an advanced AC motor in which the rotor contains permanent
magnets instead of rotor windings. These magnets produce a constant magnetic field and eliminate the need for
external excitation.
PMSMs are widely used in:
• Electric Vehicles
• Robotics
• CNC Machines
• Industrial Automation
Advantages of PMSM
• High efficiency
• Compact size
• High torque density
• Fast dynamic response
• Better speed regulation
However, PMSM control is difficult because:
• It operates on three-phase AC currents
• Torque and flux are coupled
• Direct torque control is complex
To overcome this issue, Field-Oriented Control (FOC) is used.
Concept of Field-Oriented Control (FOC)
Field-Oriented Control converts three-phase AC motor quantities into rotating reference frame quantities.
The main objective is to make the AC motor behave like a DC motor.
In a DC motor:
• Flux is controlled independently
• Torque is controlled independently
FOC achieves the same behavior in PMSM.
Mathematical Transformations Used
1. Clarke Transformation (abc → αβ)
The Clarke Transformation converts three-phase currents into two-phase stationary coordinates.
Purpose:
• Reduces complexity
• Converts three variables into two orthogonal components
2. Park Transformation (αβ → dq)
The Park Transformation converts stationary frame quantities into rotating frame quantities.
In dq frame:
• d-axis aligns with rotor flux
• q-axis is perpendicular to rotor flux
This simplifies control.
3. d-axis Current (id)
• Controls magnetic flux
• Usually maintained near zero
• Improves efficiency
4. q-axis Current (iq)
• Controls torque
• Increasing iq increases motor torque
Torque Equation
Te = 3/2 p ψf iq
Where:
• Te = Electromagnetic torque
• p = Pole pairs
• ψf = Flux linkage
• iq = q-axis current
This equation shows torque is directly proportional to iq.
Control Structure of FOC
Outer Loop (Speed Control)
• Compares reference speed with actual speed
• Generates torque-producing current reference
Inner Loop (Current Control)
• Controls id and iq separately
• Ensures fast current response
Dq2abc
abc2dq
Dq2abc1
Working Principle
1. Reference speed is applied.
2. Speed error is calculated.
3. PID controller processes error.
4. iq reference current is generated.
5. Motor currents are converted from abc to dq frame.
6. id is controlled to zero.
7. dq signals are converted back to abc.
8. PWM inverter drives PMSM.
9. Motor produces speed and torque.
10. Feedback maintains stability.
Output Waveforms
1. Speed Response
• Motor speed starts from zero.
• Speed increases smoothly.
• Speed reaches reference value.
• Stable operation observed.
2. Torque Response
• Torque is high during startup.
• Torque decreases after acceleration.
• Torque stabilizes during steady state.
3. d-q Currents
• id remains near zero.
• iq varies according to torque requirement.
• Independent control is achieved.
4. Three-Phase Currents
• Balanced sinusoidal waveforms.
• 120° phase difference.
• Proper inverter operation.
Observations
• Speed reaches reference value quickly.
• Torque stabilizes after startup.
• Three-phase currents become balanced.
• dq current control works properly.
• PMSM remains stable under vector control.
Results
The PMSM vector control system was successfully simulated. The motor achieved stable speed tracking, balanced
current waveforms, and controlled torque response.
Conclusion
The simulation of PMSM Vector Control using Field-Oriented Control was successfully performed. The motor achieved
smooth speed response, stable torque production, and balanced current waveforms. The d-axis current remained
near zero while q-axis current controlled torque effectively. The system showed stable and efficient operation.
Experiment 6
Design and Calculation of Inductor and Capacitor for EV Charger DC-DC Converter Using Vehicle Specification Sheet
Aim
To study the electrical specifications of an electric vehicle charger from a real specification sheet and determine the
suitable DC-DC converter type (Buck/Boost/Buck-Boost), along with calculation of duty cycle, inductance, and
capacitance required for converter design.
Objective
• To analyze EV charger specifications.
• To identify converter topology based on voltage levels.
• To calculate duty cycle.
• To design inductor and capacitor values.
• To understand converter sizing for EV charging applications.
Vehicle Used for Specification Study
Ampere Magnus EX
[Link]
[Link]
Parameter Value
Input Voltage 170–300 V AC
Output Voltage 66.8 V DC
Output Current 7.5 A
Frequency 47–63 Hz
Efficiency >85%
Important Observation
Your charger is:
AC Input → DC Output
So, before converter design, AC must be rectified.
Step 1 — Convert AC Input to DC Bus
Use rectified DC approximation:
𝑉𝐷𝐶 ≈ √2 × 𝑉𝐴𝐶
For nominal 230 V AC:
𝑉𝐷𝐶 = √2 × 230 ≈ 325𝑉
So, converter input becomes:
Vin ≈ 325 V DC
Step 2 — Identify Converter Type
Since:
325𝑉 > 66.8𝑉
Vin > Vout
Use:
Buck Converter
Step 3 — Missing Values You Must Assume
Use standard design assumptions.
Switching Frequency
Take:
Fs = 50 kHz
(common EV charger value)
Ripple Current
Use:
Δ𝐼𝐿 = 20% × 𝐼𝑜𝑢𝑡
Δ𝐼𝐿 = 0.2 × 7.5
Δ𝐼𝐿 = 1.5𝐴
Voltage Ripple
Use:
Δ𝑉𝑜 = 1% × 𝑉𝑜𝑢𝑡
Δ𝑉𝑜 = 0.668𝑉
Step 4 — Duty Cycle
For Buck Converter:
𝑉𝑜𝑢𝑡
𝐷=
𝑉𝑖𝑛
66.8
𝐷=
325
𝐷 = 0.205
Step 5 — Inductor
Buck converter equation:
(𝑉𝑖𝑛 − 𝑉𝑜𝑢𝑡 )𝐷
𝐿=
Δ𝐼𝐿 𝐹𝑠
Result:
L ≈ 353 µH
Step 6 — Capacitor
Buck capacitor equation:
Δ𝐼𝐿
𝐶=
8𝐹𝑠 Δ𝑉𝑜
Result:
C ≈ 5.6 µF
Final Values for Experiment
Parameter Value
Converter Type Buck
Vin (after rectifier) 325 V
Vout 66.8 V
Iout 7.5 A
Fs 50 kHz
Duty Cycle 0.205
Inductor 353 µH
Capacitor 5.6 µF
Result
The EV charger specification sheet was analyzed successfully. Based on voltage conditions, a Buck converter was
selected. The required duty cycle, inductor value, and capacitor value were calculated for converter design.
Conclusion
The experiment demonstrated how real EV charger specifications can be used to design a DC-DC converter. The
converter topology was identified, and passive component values were calculated for efficient power conversion in
EV charging systems.