Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
https://www.mathworks.com/help/slcontrol/examples/lpv-
approximation-of-a-boost-converter-model.html
A simulation of the model under various conditions shows that the model's outputs settle
down to their steady state values before 0.01 s. Hence we use t = 0.01s as the snapshot
time.
Declare number of model inputs, outputs and states.
ny = 3; nu = 1; nx = 7;
ArraySize = size(dgrid);
Compute equilibrium operating points using findop. The code takes several minutes to
finish.
op = findop(mdl, 0.01, params);
Linearize the model at the operating point array op and store the offsets.
[linsys, ~, info] = linearize(mdl, op, io, params, ...
linearizeOptions('StoreOffsets', true));
Figure 3: Bode plot of linear system array obtained over the scheduling parameter grid.
LPV Simulation: Preliminary Analysis
linsys is an array of 25 linear state-space models, each containing 1 input, 3 outputs and 7
states. The models are discrete-time with sample time of 25 ns. The bode plot shows
significant variation in dynamics over the grid of scheduling parameters. The linear system
array and the accompanying offset data (uoff, yoff and xoff) can be used to configure the
LPV system block. The "LPV model" thus obtained serves as a linear system array
approximation of the average dynamics. The LPV block configuration is available in
the BoostConverterLPVModel_Prelim model.
lpvmdl = 'BoostConverterLPVModel_Prelim';
open_system(lpvmdl);
Figure 4: LPV model configured using linsys.
For simulating the model, we use an input profile for duty cycle that roughly covers its
scheduling range. We also vary the resistive load to simulate the case of load disturbances.
Generate simulation data.
t = linspace(0,.05,1e3)';
din = 0.25*sin(2*pi*t*100)+0.25;
din(500:end) = din(500:end)+.1; % the duty cycle profile
rin = linspace(4,12,length(t))';
rin(500:end) = rin(500:end)+3;
rin(100:200) = 6.6; % the load profile
yyaxis left
plot(t,din)
xlabel('Time (s)')
ylabel('Duty Cycle')
yyaxis right
plot(t,rin)
ylabel('Resistive Load (Ohm)')
title('Scheduling Parameter Profiles for Simulation')
Figure 5: Scheduling parameter profiles chosen for simulation.
Note: the code for generating the above signals has been added to the model's PreLoadFcn
callback for independent loading and execution. If you want to override these settings and
try your own, overwrite this data in base workspace.
Simulate the LPV model.
sim(lpvmdl, 'StopTime', '0.004');
Figure 6: LPV simulation results.
Simulation shows that the LPV model is slow to simulate. So next we consider some
simplifications of the LPV model. The simplifications commonly applied to linear systems
involve reducing the number of states (see balred), modifying the sample time (see d2d)
and removing unwanted input or output channels. In order to extend this type of analysis to
LPV systems, we make the following approximation: if the scheduling parameters are
assumed to be changing slowly and the system always stays close to equilibrium
conditions, we can replace the model's state variables with "deviation
states" . With this approximation, the state offset data and initial state
value can be replaced by zero values. The resulting system of equations are linear in
deviation states .
Model Order Reduction
Let us evaluate the contribution of the linear system states to the system energy across the
array.
HSV = zeros(nx,nD*nR);
for ct = 1:nD*nR
HSV(:,ct) = hsvd(linsys(:,:,ct));
end
ax = gca;
cla(ax,'reset');
bar3(ax, HSV)
view(ax,[-69.5 16]);
xlabel(ax, 'System Number')
ylabel(ax, 'State Number')
zlabel(ax, 'State Energy')
Figure 7: Bar chart of Hankel Singular Values of the linear system array linsys. The 5-by-5
array has been flattened into a 25 element system vector for plotting.
The plot shows that only 2 states are required to capture the most significant dynamics. We
use this information to reduce the 7-state system array linsys to a 2-state array
using balred. Here we assume that the same two transformed states contribute across the
whole operating grid. Note that the LPV representation requires state-consistency across the
linear system array.
opt = balredOptions('StateElimMethod','Truncate');
linsys2 = linsys;
for ct = 1:nD*nR
linsys2(:,:,ct) = balred(linsys(:,:,ct),2,opt);
end
We are now ready to make another attempt at LPV model assembly using the linear system
array linsys3 and offsets yoff, and uoff.
LPV Simulation: Final
The preconfigured model BoostConverterLPVModel_Final uses linsys3 and the
accompanying offset data to simulate the LPV model. It uses zero values for the state
offset.
lpvmdl = 'BoostConverterLPVModel_Final';
open_system(lpvmdl);
sim(lpvmdl);
Figure 8: LPV model simulation using the reduced/scaled linear system array linsys3.
The LPV model simulates significantly faster than the original
model BoostConverterExampleModel. But how do the results compare against those
obtained from the original boost converter model? To check this, open
model BoostConverterResponseComparison. This model has Boost Converter block
configured to use the high-fidelity "Low Level Model" variant. It also contains the LPV
block whose outputs are superimposed over the outputs of the boost converter in the three
scopes.
mdl = 'BoostConverterResponseComparison';
open_system(mdl);
% sim(mdl); % uncomment to run
Figure 9: Model used for comparing the response of high fidelity model with the LPV
approximation of its average behavior.
The simulation command has been commented out; uncomment it to run. The results are
shown in the scope snapshots inserted below.
Figure 10: Inductor current signals. Blue: original, Magenta: LPV system response
Figure 11: Load current signals. Blue: original, Magenta: LPV system response
Figure 12: Load voltage signal. Blue: original, Magenta: LPV system response
The simulation runs quite slowly due to the fast switching dynamics in the original boost
converter circuit. The results show that the LPV model is able to capture the average
behavior nicely.
Conclusions
By using the duty cycle input and the resistive load as scheduling parameters, we were able
to obtain linear approximations of average model behavior in the form of a state-space
model array. This model array was further simplified by model reduction and sample rate
conversion operations.
The resulting model array together with operating point related offset data was used to
create an LPV approximation of the nonlinear average behavior. Simulation studies show
that the LPV model is able to emulate the average behavior of a high-fidelity Simscape
Power Systems model with good accuracy. The LPV model also consumes less memory
and simulates significantly faster than the original system.