Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter...
Transcript of Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter...
![Page 1: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/1.jpg)
Converter System Modeling via MATLAB/Simulink
A powerful environment for system modeling and simulation
MATLAB: programming and scripting environmentSimulink: block diagram modeling environment that runs inside MATLAB
Things we can achieve, relative to Spice:• Higher level of abstraction, suitable for higher-level system models• More sophisticated controller models• Arbitrary system elements
But:• We have to derive our own mathematical models• Simulink signals are unidirectional as in conventional block
diagramsAt CoPEC, nearly all simulation is done within MATLAB/Simulink
![Page 2: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/2.jpg)
Open-loop buck converter Time domain simulation including switching ripple
![Page 3: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/3.jpg)
Closed-loop buck converter, digital control Time domain simulation with switching ripple
![Page 4: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/4.jpg)
Open-loop buck-boost converter Frequency domain simulation, averaged model
Control-to-output transfer function
![Page 5: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/5.jpg)
Closed-loop buck converter Frequency domain simulation, averaged model
Loop gain: Bode plot
![Page 6: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/6.jpg)
MATLAB/Simulink discussion
• A structured way to write the converter averaged equations, suitable for implementation in Simulink:
State-space averaging
• Some basic converter models, implemented in Simulink
• How to plot small-signal transfer functions in Simulink
• Modeling the discontinuous conduction mode
![Page 7: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/7.jpg)
Synchronous buck converter Formulating state equations for Simulink model
iC = i – iLoad
ig = diL +t rTsiL +
Qr
Ts
Averaging the input current
Averaging the capacitor current: For both intervals,
Resulting state equations:
vL(t)
tdTs Ts
Averaging the inductor voltage
vL = d vg – i Ron + RL – vout + d – i Ron + RL – vout
with vout = v + i – iLoad esr
so vL = dvg – i Ron + RL – v – i – iLoad esr
ig = diL +t rTsiL +
Qr
TsL didt= vL = dvg – i Ron + RL – v – i – iLoad esr
C dvdt= iC = i – iLoad
vout = v + i – iLoad esr
![Page 8: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/8.jpg)
Basic buck converter model Averaged model for Simulink
Independent inputs
Integration of state variables
Outputs
Embedded MATLAB code block:• Load inputs from u
vector• Set circuit parameters• Calculate state
equations and outputs• Place results in output y vector
(used in current mode control)
![Page 9: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/9.jpg)
Time-domain simulation Synchronous buck example, Simulink
Simulink model employing synchronous buck model, with voltage mode control
Output voltage transient response
![Page 10: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/10.jpg)
Generating a Bode Plot from the Simulink file
1. Set transfer function input and output points
• Right-click on the desired wire• Select “Linearization Points”, then “input point” or “output point”
![Page 11: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/11.jpg)
Generating a Bode Plot from Simulink, p. 2
%% Bode plotter using linearization tool
% requires simulink control design toolbox
mdl = 'buckCPM4Vmodetester'; % set to file name of simulink model. Must have i/o points set within this model
io = getlinio(mdl) % get i/o signals of mdl
op = operspec(mdl)
op = findop(mdl,op) % calculate model operating point
lin = linearize(mdl,op,io) % compute state space model of linearized system
ltiview(lin) % send linearized model to LTI Viewer tool
• Save this as a script (“.m file”) and run it whenever you want to generate a Bode plot
• This script finds the steady-state operating point and linearizes the model
• The last line opens the LTI Viewer tool, which generates various small-signal plots including Bode, step response, pole/zero, Nyquist, etc.
![Page 12: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/12.jpg)
Control-to-output transfer function Gvd Generated by Simulink
Synchronous buck example of previous slides
![Page 13: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/13.jpg)
Modeling DCM Buck example, Simulink model
iL(t)
t
ipk
dTs d2TsTs
In DCM, the average inductor current can be expressed as:
Treat the average inductor current as an independent state, and solve for d2:
Note that d2 = 1 – d in CCM, and d2 < 1 – d in DCM
![Page 14: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/14.jpg)
Combined CCM-DCM model Buck converter
State equations:
Simulink model
![Page 15: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/15.jpg)
Buck control-to-output transfer function CCM vs. DCM
R = 3Ω: CCM
R = 24Ω: DCM
![Page 16: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/16.jpg)
Fundamentals of Power Electronics Chapter 9: Controller design46
9.5.4. Design example
+–
+
v(t)
–
vg(t)
28 V
–+
Compensator
HvPulse-widthmodulator
vc
Transistorgate driver
δ Gc(s)
H(s)
ve
Errorsignal
Sensorgain
iload
L50 µH
C500 µF
R3 Ω
fs = 100 kHz
VM = 4 V vref
5 V
![Page 17: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/17.jpg)
Closed-loop buck converter Simulink frequency domain simulation, averaged model
Loop gain: Bode plot
Transfer function blocks:Implementing the PID compensator
Injection point for measurement of loop gain T(s)
fc
ϕm
![Page 18: Converter System Modeling via MATLAB/Simulinkecen5797/course_material/SimulinkSlides.pdfConverter System Modeling via MATLAB/Simulink A powerful environment for system modeling and](https://reader030.fdocuments.us/reader030/viewer/2022033122/5ed988851b54311e7967bd20/html5/thumbnails/18.jpg)
Closed-loop line-to-output transfer function Simulink frequency domain simulation
Closed loop Gvg
Open loop Gvg
Open loop
Closed loop
Script that generates both plots