-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the compute and plot for a single design.
- Loading branch information
Showing
14 changed files
with
181 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
function run_8_plot_single() | ||
% Plot a single inductor design in a GUI. | ||
% | ||
% Start a GUI with the design. | ||
% Show the geometry. | ||
% Show the figures of merit. | ||
% Show the operating points. | ||
% | ||
% (c) 2019-2020, ETH Zurich, Power Electronic Systems Laboratory, T. Guillod | ||
|
||
init_toolbox(); | ||
|
||
% run model with ANN/regression | ||
run_sub('ann') | ||
|
||
% run model with analytical approximation | ||
run_sub('approx') | ||
|
||
% run model with FEM simulation | ||
run_sub('fem') | ||
|
||
end | ||
|
||
function run_sub(eval_type) | ||
% Run the FEM % Compute and plot a single inductor design (with different evaluation methods). | ||
% | ||
% Parameters: | ||
% eval_type (str): type of the evaluation ('fem', 'ann', or approx') | ||
|
||
% path of the file to be written with the computed single design | ||
file_single = ['data/compute_single_' eval_type '.mat']; | ||
|
||
% compute and plot the inductor design | ||
master_plot_single(file_single) | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
function master_plot_single(file_compute_single) | ||
% Plot a single inductor design in a GUI. | ||
% | ||
% Start a GUI with the design. | ||
% Show the geometry. | ||
% Show the figures of merit. | ||
% Show the operating points. | ||
% | ||
% Parameters: | ||
% file_compute_single (str): path of the file to be written with the computed single design | ||
% | ||
% (c) 2019-2020, ETH Zurich, Power Electronic Systems Laboratory, T. Guillod | ||
|
||
% init | ||
fprintf('################## master_plot_single\n') | ||
|
||
% load the FEM/ANN data | ||
fprintf('load\n') | ||
data_tmp = load(file_compute_single); | ||
fom = data_tmp.fom; | ||
operating = data_tmp.operating; | ||
|
||
% gui | ||
fprintf('gui\n') | ||
plot_design(fom, operating) | ||
|
||
fprintf('################## master_plot_single\n') | ||
|
||
end | ||
|
||
function plot_design(fom, operating) | ||
% Display the computed design with a GUI. | ||
% | ||
% Parameters: | ||
% fom (struct): computed figures of merit | ||
% operating (struct): computed operating points | ||
|
||
% single design is required | ||
id_design = 1; | ||
|
||
% create GUI object | ||
inductor_gui = design_display.InductorGui(id_design, fom, operating); | ||
|
||
% set design | ||
inductor_gui.set_id_select(id_design) | ||
|
||
% launch gui | ||
inductor_gui.open_gui() | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.