This article walks through the simulation of a 2+D KY converter in MATLAB Simulink. The circuit boosts a 12 V DC input to about 26 V DC. The video below shows the simulation running, and the sections after it explain how to set up the model and what to check in the results.
What is a KY converter?
The KY converter is a DC-DC topology that sits in the boost family. It is usually described as having a continuous input current and a low output voltage ripple, and it tends to respond quickly to load changes. These traits make it interesting for low-voltage sources such as batteries, small solar inputs and fuel cells, where a smooth input current matters.
The “2+D” in the title refers to a variant whose voltage gain is described in terms of the duty ratio D. If you want a wider overview of the family, see our article on the KY converter and its derivatives.
Target specification: 12 V to 26 V
The simulation uses a 12 V input and aims for roughly 26 V at the output. That is a voltage gain of about 2.17. The table-free summary below lists the quantities you need to fix before building the model:
- Input voltage: 12 V DC
- Target output voltage: about 26 V DC
- Required gain: output divided by input, about 2.17
- Switching frequency: chosen by you, commonly tens of kHz in simulation
- Load: a resistor sized for the output power you want
If the gain of your version of the circuit is written as 2 + D, a gain of 2.17 would suggest a duty ratio near 0.17. Treat this as a starting estimate only. The exact gain expression depends on the topology and on losses, so confirm it against the circuit diagram you are using and then tune D in the simulation until the output settles at 26 V.
Building the model in MATLAB Simulink
The model uses standard blocks from the Simscape Electrical (Specialized Power Systems) library. The steps are the same as for most converters of this type.
- Add the source. Use a DC voltage source set to 12 V.
- Place the power stage. Add the inductors, capacitors, diodes and the MOSFET switch according to the KY converter circuit diagram.
- Add the load. A series RLC branch set to resistance only works well as the load.
- Create the gate signal. Use a pulse generator with your chosen switching frequency and duty cycle, and connect it to the gate of the switch.
- Add measurements. Place voltage and current measurement blocks at the input, the output and the inductors, and send them to scopes.
- Configure the solver. Use a fixed-step or variable-step stiff solver with a small maximum step size, much smaller than the switching period, so the switching edges are captured.
Choosing component values
Component values are normally calculated from the allowed ripple and the switching frequency. The general relationships are the same as in a conventional boost stage, so our guide to basic boost converter design is a useful reference for the formulas.
- Inductors: larger values reduce current ripple and help keep the converter in continuous conduction. Very large values slow the transient response.
- Output capacitor: sized for the allowed output ripple. Larger values lower the ripple but increase start-up time.
- Switch and diodes: in simulation, the default parameters are fine to begin with. For hardware, pick parts whose voltage and current ratings have a safe margin above what the simulation shows.
What to check in the results
Run the simulation long enough for the output to settle, then look at the following signals.
- Output voltage: it should settle near 26 V. A small gap is normal because of diode drops and resistances in the model.
- Output ripple: zoom in on the steady state and check that the ripple is within your limit.
- Input current: in this type of converter it should look smooth and continuous rather than pulsed.
- Inductor currents: check that they do not fall to zero during the cycle if you designed for continuous conduction.
- Switch voltage and current: note the peak values, since they set the ratings of the real parts.
Open loop versus closed loop
The simulation described here runs with a fixed duty ratio, which is an open-loop setup. The output will drift if the input voltage or the load changes. To hold 26 V steady, add feedback: measure the output, compare it with a reference, and let a PI controller adjust the duty ratio. Our article on a boost converter with closed loop control shows this approach, and the 12V to 24V boost converter example uses a fuzzy logic controller for a similar voltage range.
Common problems
- Output much lower than expected: check the diode direction, the gate signal and the duty ratio.
- Simulation runs very slowly: reduce the simulation time, or use a larger step size once the circuit is working.
- Large spikes in the waveforms: these often come from ideal switches with no snubber. A small snubber or realistic parasitics can reduce them.
- Algebraic loop or solver errors: make sure the circuit has a powergui block and that every node has a path to ground.
Frequently asked questions
What does 2+D mean in the KY converter name?
It points to the form of the voltage gain, which depends on the duty ratio D. Check the gain equation of the specific circuit you are building, because the exact expression depends on the topology.
Why simulate before building hardware?
A simulation lets you test component values, see ripple and stress on the parts, and tune the duty ratio without risking real components.
Can I change the output voltage?
Yes. Change the duty ratio, or the reference in a closed-loop version, and re-check that the switch, diodes and capacitor ratings still have enough margin.
Do I need a closed-loop controller?
Not for a first test of the power stage. For a stable output under changing load or input voltage, a feedback controller is needed.