version = 4.2

//
// Saved by sw version: 2024.4
//

model "new" {
    configuration {
        hil_device = "HIL402"
        hil_configuration_id = 1
        simulation_method = exact
        simulation_time_step = auto
        simulation_discret_scaling = 1.0
        dsp_timer_periods = 100e-6, 50e-3
        ss_calc_method = "systematic elimination"
        enb_pole_shift = True
        enb_gds_oversampling = True
        show_modes = False
        device_ao_limit_enable = False
        reset_analog_outputs_on_sim_stop = True
        reset_analog_outputs_on_sim_stop_mode = Offset values
        reset_digital_outputs_on_sim_stop = True
        vhil_adio_loopback = False
        cpl_stb = False
        enb_dep_sw_detect = False
        code_section = "internal memory"
        data_section = "internal memory"
        sys_sp_rate_1 = 0.0001
        sys_sp_rate_2 = 0.05
        sys_real_type_precision = "default"
        user_real_type_precision = "default"
        sys_cpu_optimization = "high"
        user_cpu_optimization = "high"
        user_cpu_part_option = "default"
        matrix_based_reduction = True
        cpl_dynamics_analysis = False
        export_ss_to_pickle = False
        ground_scope_core = False
        dss_num_tol = 1e-15
        cce_platform = "generic"
        cce_use_relative_names = False
        cce_type_mapping_real = "double"
        cce_type_mapping_uint = "unsigned int"
        cce_type_mapping_int = "int"
        cce_platform = "generic"
        cce_use_relative_names = False
        cce_type_mapping_real = "double"
        cce_type_mapping_uint = "unsigned int"
        cce_type_mapping_int = "int"
        cce_directory = ""
        cce_custom_type_int = ""
        cce_custom_type_uint = ""
        cce_custom_type_real = ""
        tunable_params = "component defined"
        sp_compiler_type = "C compiler"
        sig_stim = "off"
        export_resource_list = ""
        export_dependency_list = ""
        excluded_resource_list = ""
        excluded_component_from_locking_list = ""
        export_out_file = ""
        export_lock_top_level = True
        export_encrypt_library = True
        export_encrypt_resources = True
        solver_type = "DAE"
        integration_method = "BDF"
        max_sim_step = 1e-4
        simulation_time = 1.0
        abs_tol = 1e-3
        rel_tol = 1e-3
        init_sim_step = 1e-6
        r_on_sw = 1e-3
        v_on_diode = 0.2
        data_sampling_rate = 0
        feedthrough_validation_error_level = warning
    }

    component Subsystem Root {
        component "core/Three Phase Voltage Source" Vgen_gridr {
            init_frequency = "f_g"
            init_rms_value = "V_grms"
        }
        [
            position = 8248, 8512
            size = 62, 256
        ]

        component "core/Inductor" Lar {
            inductance = "L_g"
        }
        [
            position = 8536, 8416
        ]

        component "core/Resistor" Rar {
            resistance = "R_g"
        }
        [
            position = 8608, 8416
        ]

        component "core/Inductor" Lar1 {
            inductance = "L_g"
        }
        [
            position = 8536, 8512
        ]

        component "core/Resistor" Rar1 {
            resistance = "R_g"
        }
        [
            position = 8608, 8512
        ]

        component "core/Inductor" Lar2 {
            inductance = "L_g"
        }
        [
            position = 8536, 8608
        ]

        component "core/Resistor" Rar2 {
            resistance = "R_g"
        }
        [
            position = 8608, 8608
        ]

        component "core/MMC Leg - Switching Function" "MMC Leg - Rectifier C" {
            cm = "C_sm"
            execution_rate = "Ts"
            init_vol = "V_sm"
            ld = "L_arm"
            rd = "R_arm"
            signal_access = "Inherit"
        }
        [
            position = 9016, 8200
            hide_name = True
            scale = -1, 1
            size = 127, 256
        ]

        component "core/MMC Leg - Switching Function" "MMC Leg - Rectifier C1" {
            cm = "C_sm"
            execution_rate = "Ts"
            init_vol = "V_sm"
            ld = "L_arm"
            rd = "R_arm"
            signal_access = "Inherit"
        }
        [
            position = 9380, 8200
            hide_name = True
            scale = -1, 1
            size = 127, 256
        ]

        component "core/MMC Leg - Switching Function" "MMC Leg - Rectifier C2" {
            cm = "C_sm"
            execution_rate = "Ts"
            init_vol = "V_sm"
            ld = "L_arm"
            rd = "R_arm"
            signal_access = "Inherit"
        }
        [
            position = 9752, 8200
            hide_name = True
            scale = -1, 1
            size = 127, 256
        ]

        component "core/Resistor" Rdc {
            resistance = "R_dc"
        }
        [
            position = 10132, 8204
            rotation = right
        ]

        component "core/Voltage Measurement" Vag {
            execution_rate = "Ts"
            sig_output = "True"
            signal_access = "Inherit"
        }
        [
            position = 8320, 8464
            rotation = right
            size = 64, 32
        ]

        component "core/Voltage Measurement" Vbg {
            execution_rate = "Ts"
            sig_output = "True"
            signal_access = "Inherit"
        }
        [
            position = 8372, 8560
            rotation = right
            size = 64, 32
        ]

        component "core/Voltage Measurement" Vcg {
            execution_rate = "Ts"
            sig_output = "True"
            signal_access = "Inherit"
        }
        [
            position = 8424, 8656
            rotation = right
            size = 64, 32
        ]

        component "core/Current Measurement" Ia {
            execution_rate = "Ts"
            sig_output = "True"
            signal_access = "Inherit"
        }
        [
            position = 8396, 8416
            size = 64, 32
        ]

        component "core/Current Measurement" Ib {
            execution_rate = "Ts"
            sig_output = "True"
            signal_access = "Inherit"
        }
        [
            position = 8440, 8512
            size = 64, 32
        ]

        component "core/Current Measurement" Ic {
            execution_rate = "Ts"
            sig_output = "True"
            signal_access = "Inherit"
        }
        [
            position = 8468, 8608
            size = 64, 32
        ]

        component "core/Voltage Measurement" Va {
            execution_rate = "Ts"
            sig_output = "True"
            signal_access = "Inherit"
        }
        [
            position = 8720, 8464
            rotation = right
            size = 64, 32
        ]

        component "core/Voltage Measurement" Vb {
            execution_rate = "Ts"
            sig_output = "True"
            signal_access = "Inherit"
        }
        [
            position = 8764, 8560
            rotation = right
            size = 64, 32
        ]

        component "core/Voltage Measurement" Vc {
            execution_rate = "Ts"
            sig_output = "True"
            signal_access = "Inherit"
        }
        [
            position = 8808, 8656
            rotation = right
            size = 64, 32
        ]

        component "core/Bus Split" "Bus Split4" {
        }
        [
            position = 8936, 8008
            hide_name = True
            scale = -1, 1
        ]

        component "core/Probe" VcupAr {
        }
        [
            position = 8864, 7952
            scale = -1, 1
        ]

        component "core/Probe" VcdownAr {
        }
        [
            position = 8864, 8016
            scale = -1, 1
        ]

        component "core/Bus Split" "Bus Split5" {
        }
        [
            position = 9100, 8008
            hide_name = True
        ]

        component "core/Probe" IupAr {
        }
        [
            position = 9172, 7952
        ]

        component "core/Probe" IdownAr {
        }
        [
            position = 9172, 8016
        ]

        component "core/Bus Split" "Bus Split6" {
        }
        [
            position = 9300, 8008
            hide_name = True
            scale = -1, 1
        ]

        component "core/Probe" VcupBr {
        }
        [
            position = 9228, 7952
            scale = -1, 1
        ]

        component "core/Probe" VcdownBr {
        }
        [
            position = 9228, 8016
            scale = -1, 1
        ]

        component "core/Bus Split" "Bus Split7" {
        }
        [
            position = 9464, 8008
            hide_name = True
        ]

        component "core/Probe" IupBr {
        }
        [
            position = 9536, 7952
        ]

        component "core/Probe" IdownBr {
        }
        [
            position = 9536, 8016
        ]

        component "core/Bus Split" "Bus Split8" {
        }
        [
            position = 9672, 8008
            hide_name = True
            scale = -1, 1
        ]

        component "core/Probe" VcupCr {
        }
        [
            position = 9600, 7952
            scale = -1, 1
        ]

        component "core/Probe" VcdownCr {
        }
        [
            position = 9600, 8016
            scale = -1, 1
        ]

        component "core/Bus Split" "Bus Split9" {
        }
        [
            position = 9832, 8008
            hide_name = True
        ]

        component "core/Probe" IupCr {
        }
        [
            position = 9904, 7952
        ]

        component "core/Probe" IdownCr {
        }
        [
            position = 9904, 8016
        ]

        component "core/Current Measurement" Idcr {
            execution_rate = "Ts"
            sig_output = "True"
            signal_access = "Inherit"
        }
        [
            position = 9968, 8104
            size = 64, 32
        ]

        component "core/Voltage Measurement" Vdcr {
            execution_rate = "Ts"
            sig_output = "True"
        }
        [
            position = 10032, 8204
            rotation = right
            size = 64, 32
        ]

        component "core/Three phase PLL" "Three phase PLL7" {
            execution_rate = "Ts"
            power_form = "variant - uniform"
        }
        [
            position = 7068, 7320
            hide_name = True
            size = 64, 128
        ]

        component "core/Abs" Abs2 {
            execution_rate = "Ts"
        }
        [
            position = 7148, 7348
            hide_name = True
        ]

        component "core/Termination" Termination7 {
            execution_rate = "Ts"
        }
        [
            position = 7148, 7400
            hide_name = True
        ]

        component "core/Termination" Termination8 {
            execution_rate = "Ts"
        }
        [
            position = 7220, 7300
            hide_name = True
        ]

        component "core/Termination" Termination9 {
            execution_rate = "Ts"
        }
        [
            position = 7268, 7320
            hide_name = True
        ]

        component "core/abc to dq" "abc to dq2" {
            disable_filter = "False"
            execution_rate = "Ts"
            wn_LPFdq = "314"
        }
        [
            position = 7072, 7476
            hide_name = True
            size = 48, 80
        ]

        component "core/Termination" Termination2 {
            execution_rate = "Ts"
        }
        [
            position = 7144, 7512
            hide_name = True
        ]

        component "core/Constant" Constant1 {
            execution_rate = "Ts"
            value = "2*3.14*f_g"
        }
        [
            position = 7084, 7552
            hide_name = True
        ]

        component "core/Constant" Constant2 {
            execution_rate = "Ts"
            value = "V_dc"
        }
        [
            position = 7012, 7604
            hide_name = True
        ]

        component "core/Sum" Sum1 {
            execution_rate = "Ts"
            signs = "+-"
        }
        [
            position = 7084, 7628
            hide_name = True
        ]

        component "core/Gain" Gain1 {
            execution_rate = "Ts"
            gain = "-1"
        }
        [
            position = 7152, 7628
            hide_name = True
        ]

        component "core/PID controller" "PID controller1" {
            controller_type = "PI"
            enb_anti_windup_out = "True"
            enb_output_limit_out = "True"
            execution_rate = "Ts"
            ki = "K_gc_iW"
            kp = "K_gc_pW"
            lower_sat_lim = "-I_f_max"
            upper_sat_lim = "I_f_max"
        }
        [
            position = 7212, 7628
            hide_name = True
        ]

        component "core/Sum" Sum2 {
            execution_rate = "Ts"
            signs = "+-"
        }
        [
            position = 7532, 7428
            hide_name = True
        ]

        component "core/Integrator" Integrator1 {
            execution_rate = "Ts"
        }
        [
            position = 7668, 7452
            hide_name = True
        ]

        component "core/Product" Product1 {
            execution_rate = "Ts"
        }
        [
            position = 7520, 7568
            hide_name = True
        ]

        component "core/Gain" Gain2 {
            execution_rate = "Ts"
            gain = "-L_f"
        }
        [
            position = 7580, 7568
            hide_name = True
        ]

        component "core/Sum" Sum3 {
            execution_rate = "Ts"
        }
        [
            position = 7660, 7536
            hide_name = True
        ]

        component "core/Sum" Sum4 {
            execution_rate = "Ts"
            signs = "3"
        }
        [
            position = 7856, 7484
            hide_name = True
        ]

        component "core/Gain" Gain3 {
            execution_rate = "Ts"
            gain = "-R_gc_a"
        }
        [
            position = 7580, 7504
            hide_name = True
        ]

        component "core/Gain" Gain4 {
            execution_rate = "Ts"
            gain = "K_gc_id"
        }
        [
            position = 7608, 7452
            hide_name = True
        ]

        component "core/Gain" Gain5 {
            execution_rate = "Ts"
            gain = "K_gc_pd"
        }
        [
            position = 7608, 7388
            hide_name = True
        ]

        component "core/Sum" Sum5 {
            execution_rate = "Ts"
        }
        [
            position = 7748, 7420
            hide_name = True
        ]

        component "core/Sum" Sum6 {
            execution_rate = "Ts"
            signs = "+-"
        }
        [
            position = 8128, 7428
            hide_name = True
        ]

        component "core/Integrator" Integrator2 {
            execution_rate = "Ts"
        }
        [
            position = 8264, 7452
            hide_name = True
        ]

        component "core/Product" Product2 {
            execution_rate = "Ts"
        }
        [
            position = 8116, 7568
            hide_name = True
        ]

        component "core/Gain" Gain6 {
            execution_rate = "Ts"
            gain = "L_f"
        }
        [
            position = 8176, 7568
            hide_name = True
        ]

        component "core/Sum" Sum7 {
            execution_rate = "Ts"
        }
        [
            position = 8256, 7536
            hide_name = True
        ]

        component "core/Sum" Sum8 {
            execution_rate = "Ts"
            signs = "3"
        }
        [
            position = 8452, 7484
            hide_name = True
        ]

        component "core/Gain" Gain7 {
            execution_rate = "Ts"
            gain = "-R_gc_a"
        }
        [
            position = 8176, 7504
            hide_name = True
        ]

        component "core/Gain" Gain8 {
            execution_rate = "Ts"
            gain = "K_gc_iq"
        }
        [
            position = 8204, 7452
            hide_name = True
        ]

        component "core/Gain" Gain9 {
            execution_rate = "Ts"
            gain = "K_gc_pq"
        }
        [
            position = 8204, 7388
            hide_name = True
        ]

        component "core/Sum" Sum9 {
            execution_rate = "Ts"
        }
        [
            position = 8344, 7420
            hide_name = True
        ]

        component "core/Constant" Constant3 {
            execution_rate = "Ts"
            value = "0"
        }
        [
            position = 8024, 7412
            hide_name = True
        ]

        component "core/dq to abc" "dq to abc1" {
            execution_rate = "Ts"
        }
        [
            position = 8708, 7472
            hide_name = True
            size = 48, 80
        ]

        component "core/Constant" Constant11 {
            execution_rate = "Ts"
            value = "0"
        }
        [
            position = 8620, 7492
            hide_name = True
        ]

        component "core/Product" Product3 {
            execution_rate = "Ts"
            signs = "*/"
        }
        [
            position = 8868, 7500
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join1" {
            execution_rate = "Ts"
            inputs = "3"
        }
        [
            position = 8788, 7472
            hide_name = True
        ]

        component "core/Limit" Limit1 {
            execution_rate = "Ts"
            lower_limit = "-0.5"
            upper_limit = "0.5"
        }
        [
            position = 8936, 7500
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join2" {
            execution_rate = "Ts"
            inputs = "3"
        }
        [
            position = 7068, 7824
            hide_name = True
        ]

        component "core/Delay" Delay1 {
            del_length = "1"
            execution_rate = "Ts"
        }
        [
            position = 7140, 7824
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join3" {
            execution_rate = "Ts"
            inputs = "3"
        }
        [
            position = 7068, 7932
            hide_name = True
        ]

        component "core/Delay" Delay2 {
            del_length = "1"
            execution_rate = "Ts"
        }
        [
            position = 7140, 7932
            hide_name = True
        ]

        component "core/Bus Split" "Bus Split10" {
            execution_rate = "Ts"
            outputs = "3"
        }
        [
            position = 7216, 7824
            hide_name = True
        ]

        component "core/Bus Split" "Bus Split11" {
            execution_rate = "Ts"
            outputs = "3"
        }
        [
            position = 7216, 7932
            hide_name = True
        ]

        component "core/Bus Split" "Bus Split12" {
            execution_rate = "Ts"
            outputs = "3"
        }
        [
            position = 7068, 8040
            hide_name = True
        ]

        component Subsystem PWMa1 {
            layout = dynamic
            component "core/Gain" Gain11 {
                execution_rate = "Ts"
                gain = "1/16"
            }
            [
                position = 7704, 8204
                hide_name = True
            ]

            component "core/Sum" Sum2 {
                execution_rate = "Ts"
                signs = "+-"
            }
            [
                position = 7800, 8212
                hide_name = True
            ]

            component "core/Product" Product1 {
                execution_rate = "Ts"
            }
            [
                position = 7924, 8220
                hide_name = True
            ]

            component "core/Signal switch" "Signal switch1" {
                criterion = "ctrl >= threshold"
                execution_rate = "Ts"
                threshold = "0"
            }
            [
                position = 7832, 8360
                hide_name = True
            ]

            component "core/Constant" Constant1 {
                execution_rate = "Ts"
                value = "0.001"
            }
            [
                position = 7764, 8332
                hide_name = True
            ]

            component "core/Constant" Constant2 {
                execution_rate = "Ts"
                value = "-0.001"
            }
            [
                position = 7764, 8392
                hide_name = True
            ]

            component "core/Constant" Constant3 {
                execution_rate = "Ts"
                value = "0.5"
            }
            [
                position = 7824, 8028
                hide_name = True
            ]

            component "core/Sum" Sum3 {
                execution_rate = "Ts"
            }
            [
                position = 7928, 8064
                hide_name = True
            ]

            component "core/Sum" Sum4 {
                execution_rate = "Ts"
            }
            [
                position = 8008, 8136
                hide_name = True
            ]

            component "core/Relational operator" "Relational operator1" {
                execution_rate = "Ts"
                relational_op = ">="
            }
            [
                position = 8148, 8144
                hide_name = True
            ]

            component "core/Triangular Wave Source" "Triangular Wave Source1" {
                execution_rate = "Ts"
                frequency = "f_sw"
                max_val = "1"
                min_val = "0"
                phase = "phase_delay"
            }
            [
                position = 8068, 8208
                hide_name = True
            ]

            component "core/C function" SortUP4 {
                arb_defs = "/*Begin code section*/

/*End code section*/"
                execution_rate = "Ts"
                global_variables = "int i;real Vtemp;real Vavg;"
                input_terminals = "real m;real Vcap;real Iarm;"
                input_terminals_dimensions = "1;16;1"
                input_terminals_feedthrough = "True;True;True"
                input_terminals_show_labels = "True;True;True"
                output_fnc = "/*Begin code section*/
Vtemp=0;
for (i = 0; i < 16; ++i)
{
    Vtemp = Vtemp + Vcap[i];
}
Vavg = Vtemp/16;
/*End code section*/"
                output_terminals = "real sw;"
                output_terminals_dimensions = "16"
                output_terminals_feedthrough = "True"
                output_terminals_show_labels = "True"
            }
            [
                position = 8248, 7808
                hide_name = True
                size = 80, 88
            ]

            component "core/Sum" Sum5 {
                execution_rate = "Ts"
                signs = "+"
            }
            [
                position = 7624, 8204
                hide_name = True
            ]

            component "core/Bus Join" "Bus Join1" {
                inputs = "16"
            }
            [
                position = 8288, 8056
            ]

            port Vc {
                position = left:2
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7528, 8204
            ]

            port m {
                position = left:1
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7824, 8096
            ]

            port Ic {
                position = left:3
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7800, 8272
            ]

            port sw {
                position = right:1
                kind = sp
                direction =  in
                sp_type {
                    default = inherit
                    readonly = True
                }
            }
            [
                position = 8216, 8144
            ]

            junction Junction77 sp
            [
                position = 7564, 8204
            ]

            connect Sum2.out Product1.in as Connection23
            connect Ic "Signal switch1.in2" as Connection24
            [
                breakpoints = 7832, 8288
            ]
            connect Constant2.out "Signal switch1.in1" as Connection25
            connect Constant1.out "Signal switch1.in" as Connection26
            connect Sum3.out Sum4.in as Connection31
            connect "Relational operator1.out" sw as Connection35
            connect "Signal switch1.out" Product1.in1 as Connection220
            connect Gain11.out Sum2.in as Connection226
            connect Sum5.out Gain11.in as Connection228
            connect Vc Junction77 as Connection229
            connect Junction77 Sum5.in as Connection230
            connect Sum2.in1 Junction77 as Connection231
            [
                breakpoints = 7736, 8260; 7564, 8260
            ]
            connect m Sum3.in1 as Connection232
            connect Constant3.out Sum3.in as Connection233
            connect Product1.out Sum4.in1 as Connection240
            [
                breakpoints = 7968, 8192
            ]
            connect Sum4.out "Relational operator1.in" as Connection241
            connect "Triangular Wave Source1.out" "Relational operator1.in1" as Connection242
        }
        [
            position = 7684, 7780
            size = 104, 80
        ]

        component "core/Gain" Gain11 {
            execution_rate = "Ts"
            gain = "-1"
        }
        [
            position = 7584, 7748
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join4" {
            execution_rate = "Ts"
        }
        [
            position = 7888, 7776
            hide_name = True
        ]

        component "core/Logical operator" "Logical operator1" {
            execution_rate = "Ts"
            operator = "NOT"
        }
        [
            position = 7808, 7804
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join5" {
            execution_rate = "Ts"
        }
        [
            position = 7888, 7892
            hide_name = True
        ]

        component "core/Logical operator" "Logical operator2" {
            execution_rate = "Ts"
            operator = "NOT"
        }
        [
            position = 7808, 7920
            hide_name = True
        ]

        component "core/Bus Split" "Bus Split13" {
            execution_rate = "Ts"
        }
        [
            position = 7508, 7840
            hide_name = True
        ]

        component "core/Bus Split" "Bus Split14" {
            execution_rate = "Ts"
        }
        [
            position = 7508, 7924
            hide_name = True
        ]

        component "core/Gain" Gain12 {
            execution_rate = "Ts"
            gain = "-1"
        }
        [
            position = 7584, 7992
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join6" {
            execution_rate = "Ts"
        }
        [
            position = 7888, 8020
            hide_name = True
        ]

        component "core/Logical operator" "Logical operator3" {
            execution_rate = "Ts"
            operator = "NOT"
        }
        [
            position = 7808, 8048
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join7" {
            execution_rate = "Ts"
        }
        [
            position = 7888, 8136
            hide_name = True
        ]

        component "core/Logical operator" "Logical operator4" {
            execution_rate = "Ts"
            operator = "NOT"
        }
        [
            position = 7808, 8164
            hide_name = True
        ]

        component "core/Bus Split" "Bus Split15" {
            execution_rate = "Ts"
        }
        [
            position = 7508, 8084
            hide_name = True
        ]

        component "core/Bus Split" "Bus Split16" {
            execution_rate = "Ts"
        }
        [
            position = 7508, 8168
            hide_name = True
        ]

        component "core/Gain" Gain13 {
            execution_rate = "Ts"
            gain = "-1"
        }
        [
            position = 7584, 8248
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join8" {
            execution_rate = "Ts"
        }
        [
            position = 7888, 8276
            hide_name = True
        ]

        component "core/Logical operator" "Logical operator5" {
            execution_rate = "Ts"
            operator = "NOT"
        }
        [
            position = 7808, 8304
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join9" {
            execution_rate = "Ts"
        }
        [
            position = 7888, 8392
            hide_name = True
        ]

        component "core/Logical operator" "Logical operator6" {
            execution_rate = "Ts"
            operator = "NOT"
        }
        [
            position = 7808, 8420
            hide_name = True
        ]

        component "core/Bus Split" "Bus Split17" {
            execution_rate = "Ts"
        }
        [
            position = 7508, 8340
            hide_name = True
        ]

        component "core/Bus Split" "Bus Split18" {
            execution_rate = "Ts"
        }
        [
            position = 7508, 8424
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join10" {
            execution_rate = "Ts"
        }
        [
            position = 8000, 7836
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join11" {
            execution_rate = "Ts"
        }
        [
            position = 8000, 8080
            hide_name = True
        ]

        component "core/Bus Join" "Bus Join12" {
            execution_rate = "Ts"
        }
        [
            position = 8000, 8340
            hide_name = True
        ]

        component Subsystem PWMa2 {
            layout = dynamic
            component "core/Gain" Gain11 {
                execution_rate = "Ts"
                gain = "1/16"
            }
            [
                position = 7704, 8204
                hide_name = True
            ]

            component "core/Sum" Sum2 {
                execution_rate = "Ts"
                signs = "+-"
            }
            [
                position = 7800, 8212
                hide_name = True
            ]

            component "core/Product" Product1 {
                execution_rate = "Ts"
            }
            [
                position = 7924, 8220
                hide_name = True
            ]

            component "core/Signal switch" "Signal switch1" {
                criterion = "ctrl >= threshold"
                execution_rate = "Ts"
                threshold = "0"
            }
            [
                position = 7832, 8360
                hide_name = True
            ]

            component "core/Constant" Constant1 {
                execution_rate = "Ts"
                value = "0.001"
            }
            [
                position = 7764, 8332
                hide_name = True
            ]

            component "core/Constant" Constant2 {
                execution_rate = "Ts"
                value = "-0.001"
            }
            [
                position = 7764, 8392
                hide_name = True
            ]

            component "core/Constant" Constant3 {
                execution_rate = "Ts"
                value = "0.5"
            }
            [
                position = 7824, 8028
                hide_name = True
            ]

            component "core/Sum" Sum3 {
                execution_rate = "Ts"
            }
            [
                position = 7928, 8064
                hide_name = True
            ]

            component "core/Sum" Sum4 {
                execution_rate = "Ts"
            }
            [
                position = 8008, 8136
                hide_name = True
            ]

            component "core/Relational operator" "Relational operator1" {
                execution_rate = "Ts"
                relational_op = ">="
            }
            [
                position = 8148, 8144
                hide_name = True
            ]

            component "core/Triangular Wave Source" "Triangular Wave Source1" {
                execution_rate = "Ts"
                frequency = "f_sw"
                max_val = "1"
                min_val = "0"
                phase = "phase_delay"
            }
            [
                position = 8068, 8208
                hide_name = True
            ]

            component "core/C function" SortUP4 {
                arb_defs = "/*Begin code section*/

/*End code section*/"
                execution_rate = "Ts"
                global_variables = "int i;real Vtemp;real Vavg;"
                input_terminals = "real m;real Vcap;real Iarm;"
                input_terminals_dimensions = "1;16;1"
                input_terminals_feedthrough = "True;True;True"
                input_terminals_show_labels = "True;True;True"
                output_fnc = "/*Begin code section*/
Vtemp=0;
for (i = 0; i < 16; ++i)
{
    Vtemp = Vtemp + Vcap[i];
}
Vavg = Vtemp/16;
/*End code section*/"
                output_terminals = "real sw;"
                output_terminals_dimensions = "16"
                output_terminals_feedthrough = "True"
                output_terminals_show_labels = "True"
            }
            [
                position = 8248, 7808
                hide_name = True
                size = 80, 88
            ]

            component "core/Sum" Sum5 {
                execution_rate = "Ts"
                signs = "+"
            }
            [
                position = 7624, 8204
                hide_name = True
            ]

            port Vc {
                position = left:2
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7528, 8204
            ]

            port m {
                position = left:1
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7824, 8096
            ]

            port Ic {
                position = left:3
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7800, 8272
            ]

            port sw {
                position = right:1
                kind = sp
                direction =  in
                sp_type {
                    default = inherit
                    readonly = True
                }
            }
            [
                position = 8216, 8144
            ]

            junction Junction77 sp
            [
                position = 7564, 8204
            ]

            connect Sum2.out Product1.in as Connection23
            connect Ic "Signal switch1.in2" as Connection24
            [
                breakpoints = 7832, 8288
            ]
            connect Constant2.out "Signal switch1.in1" as Connection25
            connect Constant1.out "Signal switch1.in" as Connection26
            connect Sum3.out Sum4.in as Connection31
            connect "Relational operator1.out" sw as Connection35
            connect "Signal switch1.out" Product1.in1 as Connection220
            connect Gain11.out Sum2.in as Connection226
            connect Sum5.out Gain11.in as Connection228
            connect Vc Junction77 as Connection229
            connect Junction77 Sum5.in as Connection230
            connect Sum2.in1 Junction77 as Connection231
            [
                breakpoints = 7736, 8260; 7564, 8260
            ]
            connect m Sum3.in1 as Connection232
            connect Constant3.out Sum3.in as Connection233
            connect Product1.out Sum4.in1 as Connection240
            [
                breakpoints = 7968, 8192
            ]
            connect Sum4.out "Relational operator1.in" as Connection241
            connect "Triangular Wave Source1.out" "Relational operator1.in1" as Connection242
        }
        [
            position = 7684, 7896
            size = 104, 80
        ]

        component Subsystem PWMb1 {
            layout = dynamic
            component "core/Gain" Gain11 {
                execution_rate = "Ts"
                gain = "1/16"
            }
            [
                position = 7704, 8204
                hide_name = True
            ]

            component "core/Sum" Sum2 {
                execution_rate = "Ts"
                signs = "+-"
            }
            [
                position = 7800, 8212
                hide_name = True
            ]

            component "core/Product" Product1 {
                execution_rate = "Ts"
            }
            [
                position = 7924, 8220
                hide_name = True
            ]

            component "core/Signal switch" "Signal switch1" {
                criterion = "ctrl >= threshold"
                execution_rate = "Ts"
                threshold = "0"
            }
            [
                position = 7832, 8360
                hide_name = True
            ]

            component "core/Constant" Constant1 {
                execution_rate = "Ts"
                value = "0.001"
            }
            [
                position = 7764, 8332
                hide_name = True
            ]

            component "core/Constant" Constant2 {
                execution_rate = "Ts"
                value = "-0.001"
            }
            [
                position = 7764, 8392
                hide_name = True
            ]

            component "core/Constant" Constant3 {
                execution_rate = "Ts"
                value = "0.5"
            }
            [
                position = 7824, 8028
                hide_name = True
            ]

            component "core/Sum" Sum3 {
                execution_rate = "Ts"
            }
            [
                position = 7928, 8064
                hide_name = True
            ]

            component "core/Sum" Sum4 {
                execution_rate = "Ts"
            }
            [
                position = 8008, 8136
                hide_name = True
            ]

            component "core/Relational operator" "Relational operator1" {
                execution_rate = "Ts"
                relational_op = ">="
            }
            [
                position = 8148, 8144
                hide_name = True
            ]

            component "core/Triangular Wave Source" "Triangular Wave Source1" {
                execution_rate = "Ts"
                frequency = "f_sw"
                max_val = "1"
                min_val = "0"
                phase = "phase_delay"
            }
            [
                position = 8068, 8208
                hide_name = True
            ]

            component "core/C function" SortUP4 {
                arb_defs = "/*Begin code section*/

/*End code section*/"
                execution_rate = "Ts"
                global_variables = "int i;real Vtemp;real Vavg;"
                input_terminals = "real m;real Vcap;real Iarm;"
                input_terminals_dimensions = "1;16;1"
                input_terminals_feedthrough = "True;True;True"
                input_terminals_show_labels = "True;True;True"
                output_fnc = "/*Begin code section*/
Vtemp=0;
for (i = 0; i < 16; ++i)
{
    Vtemp = Vtemp + Vcap[i];
}
Vavg = Vtemp/16;
/*End code section*/"
                output_terminals = "real sw;"
                output_terminals_dimensions = "16"
                output_terminals_feedthrough = "True"
                output_terminals_show_labels = "True"
            }
            [
                position = 8248, 7808
                hide_name = True
                size = 80, 88
            ]

            component "core/Sum" Sum5 {
                execution_rate = "Ts"
                signs = "+"
            }
            [
                position = 7624, 8204
                hide_name = True
            ]

            port Vc {
                position = left:2
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7528, 8204
            ]

            port m {
                position = left:1
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7824, 8096
            ]

            port Ic {
                position = left:3
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7800, 8272
            ]

            port sw {
                position = right:1
                kind = sp
                direction =  in
                sp_type {
                    default = inherit
                    readonly = True
                }
            }
            [
                position = 8216, 8144
            ]

            junction Junction77 sp
            [
                position = 7564, 8204
            ]

            connect Sum2.out Product1.in as Connection23
            connect Ic "Signal switch1.in2" as Connection24
            [
                breakpoints = 7832, 8288
            ]
            connect Constant2.out "Signal switch1.in1" as Connection25
            connect Constant1.out "Signal switch1.in" as Connection26
            connect Sum3.out Sum4.in as Connection31
            connect "Relational operator1.out" sw as Connection35
            connect "Signal switch1.out" Product1.in1 as Connection220
            connect Gain11.out Sum2.in as Connection226
            connect Sum5.out Gain11.in as Connection228
            connect Vc Junction77 as Connection229
            connect Junction77 Sum5.in as Connection230
            connect Sum2.in1 Junction77 as Connection231
            [
                breakpoints = 7736, 8260; 7564, 8260
            ]
            connect m Sum3.in1 as Connection232
            connect Constant3.out Sum3.in as Connection233
            connect Product1.out Sum4.in1 as Connection240
            [
                breakpoints = 7968, 8192
            ]
            connect Sum4.out "Relational operator1.in" as Connection241
            connect "Triangular Wave Source1.out" "Relational operator1.in1" as Connection242
        }
        [
            position = 7684, 8020
            size = 104, 80
        ]

        component Subsystem PWMb2 {
            layout = dynamic
            component "core/Gain" Gain11 {
                execution_rate = "Ts"
                gain = "1/16"
            }
            [
                position = 7704, 8204
                hide_name = True
            ]

            component "core/Sum" Sum2 {
                execution_rate = "Ts"
                signs = "+-"
            }
            [
                position = 7800, 8212
                hide_name = True
            ]

            component "core/Product" Product1 {
                execution_rate = "Ts"
            }
            [
                position = 7924, 8220
                hide_name = True
            ]

            component "core/Signal switch" "Signal switch1" {
                criterion = "ctrl >= threshold"
                execution_rate = "Ts"
                threshold = "0"
            }
            [
                position = 7832, 8360
                hide_name = True
            ]

            component "core/Constant" Constant1 {
                execution_rate = "Ts"
                value = "0.001"
            }
            [
                position = 7764, 8332
                hide_name = True
            ]

            component "core/Constant" Constant2 {
                execution_rate = "Ts"
                value = "-0.001"
            }
            [
                position = 7764, 8392
                hide_name = True
            ]

            component "core/Constant" Constant3 {
                execution_rate = "Ts"
                value = "0.5"
            }
            [
                position = 7824, 8028
                hide_name = True
            ]

            component "core/Sum" Sum3 {
                execution_rate = "Ts"
            }
            [
                position = 7928, 8064
                hide_name = True
            ]

            component "core/Sum" Sum4 {
                execution_rate = "Ts"
            }
            [
                position = 8008, 8136
                hide_name = True
            ]

            component "core/Relational operator" "Relational operator1" {
                execution_rate = "Ts"
                relational_op = ">="
            }
            [
                position = 8148, 8144
                hide_name = True
            ]

            component "core/Triangular Wave Source" "Triangular Wave Source1" {
                execution_rate = "Ts"
                frequency = "f_sw"
                max_val = "1"
                min_val = "0"
                phase = "phase_delay"
            }
            [
                position = 8068, 8208
                hide_name = True
            ]

            component "core/C function" SortUP4 {
                arb_defs = "/*Begin code section*/

/*End code section*/"
                execution_rate = "Ts"
                global_variables = "int i;real Vtemp;real Vavg;"
                input_terminals = "real m;real Vcap;real Iarm;"
                input_terminals_dimensions = "1;16;1"
                input_terminals_feedthrough = "True;True;True"
                input_terminals_show_labels = "True;True;True"
                output_fnc = "/*Begin code section*/
Vtemp=0;
for (i = 0; i < 16; ++i)
{
    Vtemp = Vtemp + Vcap[i];
}
Vavg = Vtemp/16;
/*End code section*/"
                output_terminals = "real sw;"
                output_terminals_dimensions = "16"
                output_terminals_feedthrough = "True"
                output_terminals_show_labels = "True"
            }
            [
                position = 8248, 7808
                hide_name = True
                size = 80, 88
            ]

            component "core/Sum" Sum5 {
                execution_rate = "Ts"
                signs = "+"
            }
            [
                position = 7624, 8204
                hide_name = True
            ]

            port Vc {
                position = left:2
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7528, 8204
            ]

            port m {
                position = left:1
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7824, 8096
            ]

            port Ic {
                position = left:3
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7800, 8272
            ]

            port sw {
                position = right:1
                kind = sp
                direction =  in
                sp_type {
                    default = inherit
                    readonly = True
                }
            }
            [
                position = 8216, 8144
            ]

            junction Junction77 sp
            [
                position = 7564, 8204
            ]

            connect Sum2.out Product1.in as Connection23
            connect Ic "Signal switch1.in2" as Connection24
            [
                breakpoints = 7832, 8288
            ]
            connect Constant2.out "Signal switch1.in1" as Connection25
            connect Constant1.out "Signal switch1.in" as Connection26
            connect Sum3.out Sum4.in as Connection31
            connect "Relational operator1.out" sw as Connection35
            connect "Signal switch1.out" Product1.in1 as Connection220
            connect Gain11.out Sum2.in as Connection226
            connect Sum5.out Gain11.in as Connection228
            connect Vc Junction77 as Connection229
            connect Junction77 Sum5.in as Connection230
            connect Sum2.in1 Junction77 as Connection231
            [
                breakpoints = 7736, 8260; 7564, 8260
            ]
            connect m Sum3.in1 as Connection232
            connect Constant3.out Sum3.in as Connection233
            connect Product1.out Sum4.in1 as Connection240
            [
                breakpoints = 7968, 8192
            ]
            connect Sum4.out "Relational operator1.in" as Connection241
            connect "Triangular Wave Source1.out" "Relational operator1.in1" as Connection242
        }
        [
            position = 7684, 8156
            size = 104, 80
        ]

        component Subsystem PWMc1 {
            layout = dynamic
            component "core/Gain" Gain11 {
                execution_rate = "Ts"
                gain = "1/16"
            }
            [
                position = 7704, 8204
                hide_name = True
            ]

            component "core/Sum" Sum2 {
                execution_rate = "Ts"
                signs = "+-"
            }
            [
                position = 7800, 8212
                hide_name = True
            ]

            component "core/Product" Product1 {
                execution_rate = "Ts"
            }
            [
                position = 7924, 8220
                hide_name = True
            ]

            component "core/Signal switch" "Signal switch1" {
                criterion = "ctrl >= threshold"
                execution_rate = "Ts"
                threshold = "0"
            }
            [
                position = 7832, 8360
                hide_name = True
            ]

            component "core/Constant" Constant1 {
                execution_rate = "Ts"
                value = "0.001"
            }
            [
                position = 7764, 8332
                hide_name = True
            ]

            component "core/Constant" Constant2 {
                execution_rate = "Ts"
                value = "-0.001"
            }
            [
                position = 7764, 8392
                hide_name = True
            ]

            component "core/Constant" Constant3 {
                execution_rate = "Ts"
                value = "0.5"
            }
            [
                position = 7824, 8028
                hide_name = True
            ]

            component "core/Sum" Sum3 {
                execution_rate = "Ts"
            }
            [
                position = 7928, 8064
                hide_name = True
            ]

            component "core/Sum" Sum4 {
                execution_rate = "Ts"
            }
            [
                position = 8008, 8136
                hide_name = True
            ]

            component "core/Relational operator" "Relational operator1" {
                execution_rate = "Ts"
                relational_op = ">="
            }
            [
                position = 8148, 8144
                hide_name = True
            ]

            component "core/Triangular Wave Source" "Triangular Wave Source1" {
                execution_rate = "Ts"
                frequency = "f_sw"
                max_val = "1"
                min_val = "0"
                phase = "phase_delay"
            }
            [
                position = 8068, 8208
                hide_name = True
            ]

            component "core/C function" SortUP4 {
                arb_defs = "/*Begin code section*/

/*End code section*/"
                execution_rate = "Ts"
                global_variables = "int i;real Vtemp;real Vavg;"
                input_terminals = "real m;real Vcap;real Iarm;"
                input_terminals_dimensions = "1;16;1"
                input_terminals_feedthrough = "True;True;True"
                input_terminals_show_labels = "True;True;True"
                output_fnc = "/*Begin code section*/
Vtemp=0;
for (i = 0; i < 16; ++i)
{
    Vtemp = Vtemp + Vcap[i];
}
Vavg = Vtemp/16;
/*End code section*/"
                output_terminals = "real sw;"
                output_terminals_dimensions = "16"
                output_terminals_feedthrough = "True"
                output_terminals_show_labels = "True"
            }
            [
                position = 8248, 7808
                hide_name = True
                size = 80, 88
            ]

            component "core/Sum" Sum5 {
                execution_rate = "Ts"
                signs = "+"
            }
            [
                position = 7624, 8204
                hide_name = True
            ]

            port Vc {
                position = left:2
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7528, 8204
            ]

            port m {
                position = left:1
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7824, 8096
            ]

            port Ic {
                position = left:3
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7800, 8272
            ]

            port sw {
                position = right:1
                kind = sp
                direction =  in
                sp_type {
                    default = inherit
                    readonly = True
                }
            }
            [
                position = 8216, 8144
            ]

            junction Junction77 sp
            [
                position = 7564, 8204
            ]

            connect Sum2.out Product1.in as Connection23
            connect Ic "Signal switch1.in2" as Connection24
            [
                breakpoints = 7832, 8288
            ]
            connect Constant2.out "Signal switch1.in1" as Connection25
            connect Constant1.out "Signal switch1.in" as Connection26
            connect Sum3.out Sum4.in as Connection31
            connect "Relational operator1.out" sw as Connection35
            connect "Signal switch1.out" Product1.in1 as Connection220
            connect Gain11.out Sum2.in as Connection226
            connect Sum5.out Gain11.in as Connection228
            connect Vc Junction77 as Connection229
            connect Junction77 Sum5.in as Connection230
            connect Sum2.in1 Junction77 as Connection231
            [
                breakpoints = 7736, 8260; 7564, 8260
            ]
            connect m Sum3.in1 as Connection232
            connect Constant3.out Sum3.in as Connection233
            connect Product1.out Sum4.in1 as Connection240
            [
                breakpoints = 7968, 8192
            ]
            connect Sum4.out "Relational operator1.in" as Connection241
            connect "Triangular Wave Source1.out" "Relational operator1.in1" as Connection242
        }
        [
            position = 7684, 8280
            size = 104, 80
        ]

        component Subsystem PWMc2 {
            layout = dynamic
            component "core/Gain" Gain11 {
                execution_rate = "Ts"
                gain = "1/16"
            }
            [
                position = 7704, 8204
                hide_name = True
            ]

            component "core/Sum" Sum2 {
                execution_rate = "Ts"
                signs = "+-"
            }
            [
                position = 7800, 8212
                hide_name = True
            ]

            component "core/Product" Product1 {
                execution_rate = "Ts"
            }
            [
                position = 7924, 8220
                hide_name = True
            ]

            component "core/Signal switch" "Signal switch1" {
                criterion = "ctrl >= threshold"
                execution_rate = "Ts"
                threshold = "0"
            }
            [
                position = 7832, 8360
                hide_name = True
            ]

            component "core/Constant" Constant1 {
                execution_rate = "Ts"
                value = "0.001"
            }
            [
                position = 7764, 8332
                hide_name = True
            ]

            component "core/Constant" Constant2 {
                execution_rate = "Ts"
                value = "-0.001"
            }
            [
                position = 7764, 8392
                hide_name = True
            ]

            component "core/Constant" Constant3 {
                execution_rate = "Ts"
                value = "0.5"
            }
            [
                position = 7824, 8028
                hide_name = True
            ]

            component "core/Sum" Sum3 {
                execution_rate = "Ts"
            }
            [
                position = 7928, 8064
                hide_name = True
            ]

            component "core/Sum" Sum4 {
                execution_rate = "Ts"
            }
            [
                position = 8008, 8136
                hide_name = True
            ]

            component "core/Relational operator" "Relational operator1" {
                execution_rate = "Ts"
                relational_op = ">="
            }
            [
                position = 8148, 8144
                hide_name = True
            ]

            component "core/Triangular Wave Source" "Triangular Wave Source1" {
                execution_rate = "Ts"
                frequency = "f_sw"
                max_val = "1"
                min_val = "0"
                phase = "phase_delay"
            }
            [
                position = 8068, 8208
                hide_name = True
            ]

            component "core/C function" SortUP4 {
                arb_defs = "/*Begin code section*/

/*End code section*/"
                execution_rate = "Ts"
                global_variables = "int i;real Vtemp;real Vavg;"
                input_terminals = "real m;real Vcap;real Iarm;"
                input_terminals_dimensions = "1;16;1"
                input_terminals_feedthrough = "True;True;True"
                input_terminals_show_labels = "True;True;True"
                output_fnc = "/*Begin code section*/
Vtemp=0;
for (i = 0; i < 16; ++i)
{
    Vtemp = Vtemp + Vcap[i];
}
Vavg = Vtemp/16;
/*End code section*/"
                output_terminals = "real sw;"
                output_terminals_dimensions = "16"
                output_terminals_feedthrough = "True"
                output_terminals_show_labels = "True"
            }
            [
                position = 8248, 7808
                hide_name = True
                size = 80, 88
            ]

            component "core/Sum" Sum5 {
                execution_rate = "Ts"
                signs = "+"
            }
            [
                position = 7624, 8204
                hide_name = True
            ]

            port Vc {
                position = left:2
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7528, 8204
            ]

            port m {
                position = left:1
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7824, 8096
            ]

            port Ic {
                position = left:3
                kind = sp
                direction =  out
                sp_type {
                    default = auto
                    readonly = True
                }
            }
            [
                position = 7800, 8272
            ]

            port sw {
                position = right:1
                kind = sp
                direction =  in
                sp_type {
                    default = inherit
                    readonly = True
                }
            }
            [
                position = 8216, 8144
            ]

            junction Junction77 sp
            [
                position = 7564, 8204
            ]

            connect Sum2.out Product1.in as Connection23
            connect Ic "Signal switch1.in2" as Connection24
            [
                breakpoints = 7832, 8288
            ]
            connect Constant2.out "Signal switch1.in1" as Connection25
            connect Constant1.out "Signal switch1.in" as Connection26
            connect Sum3.out Sum4.in as Connection31
            connect "Relational operator1.out" sw as Connection35
            connect "Signal switch1.out" Product1.in1 as Connection220
            connect Gain11.out Sum2.in as Connection226
            connect Sum5.out Gain11.in as Connection228
            connect Vc Junction77 as Connection229
            connect Junction77 Sum5.in as Connection230
            connect Sum2.in1 Junction77 as Connection231
            [
                breakpoints = 7736, 8260; 7564, 8260
            ]
            connect m Sum3.in1 as Connection232
            connect Constant3.out Sum3.in as Connection233
            connect Product1.out Sum4.in1 as Connection240
            [
                breakpoints = 7968, 8192
            ]
            connect Sum4.out "Relational operator1.in" as Connection241
            connect "Triangular Wave Source1.out" "Relational operator1.in1" as Connection242
        }
        [
            position = 7684, 8400
            size = 104, 80
        ]

        component "core/Half Bridge" "Half Bridge1" {
            fvd_def_method = "LUT"
        }
        [
            position = 8616, 7976
            size = 80, 192
        ]

        tag "Electric Tag1" {
            value = "DC+"
            scope = global
            kind = pe
        }
        [
            position = 9868, 8148
            size = 60, 20
        ]

        tag "Electric Tag2" {
            value = "DC-"
            scope = global
            kind = pe
        }
        [
            position = 9868, 8252
            size = 60, 20
        ]

        tag "Electric Tag3" {
            value = "DC+"
            scope = global
            kind = pe
        }
        [
            position = 9500, 8104
            rotation = down
            size = 60, 20
        ]

        tag "Electric Tag4" {
            value = "DC+"
            scope = global
            kind = pe
        }
        [
            position = 9136, 8104
            rotation = down
            size = 60, 20
        ]

        tag "Electric Tag5" {
            value = "DC-"
            scope = global
            kind = pe
        }
        [
            position = 9500, 8296
            rotation = down
            size = 60, 20
        ]

        tag "Electric Tag6" {
            value = "DC-"
            scope = global
            kind = pe
        }
        [
            position = 9136, 8296
            rotation = down
            size = 60, 20
        ]

        tag Goto105 {
            value = "Va_gridr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8380, 8464
            hide_name = True
            size = 60, 20
        ]

        tag Goto106 {
            value = "Vb_gridr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8432, 8560
            hide_name = True
            size = 60, 20
        ]

        tag Goto107 {
            value = "Vc_gridr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8484, 8656
            hide_name = True
            size = 60, 20
        ]

        tag Goto108 {
            value = "Iar"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8452, 8388
            hide_name = True
            size = 60, 20
        ]

        tag Goto109 {
            value = "Ibr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8500, 8484
            hide_name = True
            size = 60, 20
        ]

        tag Goto110 {
            value = "Icr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8524, 8580
            hide_name = True
            size = 60, 20
        ]

        tag Goto114 {
            value = "Var"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8788, 8464
            rotation = down
            hide_name = True
            scale = -1, 1
            size = 60, 20
        ]

        tag Goto115 {
            value = "Vbr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8832, 8560
            rotation = down
            hide_name = True
            scale = -1, 1
            size = 60, 20
        ]

        tag Goto116 {
            value = "Vcr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8876, 8656
            rotation = down
            hide_name = True
            scale = -1, 1
            size = 60, 20
        ]

        tag Goto9 {
            value = "IarmsAr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 9056, 7952
            rotation = left
            hide_name = True
            size = 60, 20
        ]

        tag Goto10 {
            value = "VcapAr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8976, 7952
            rotation = left
            hide_name = True
            size = 60, 20
        ]

        tag Goto117 {
            value = "IarmsBr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 9420, 7952
            rotation = left
            hide_name = True
            size = 60, 20
        ]

        tag Goto118 {
            value = "VcapBr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 9340, 7952
            rotation = left
            hide_name = True
            size = 60, 20
        ]

        tag Goto119 {
            value = "IarmsCr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 9792, 7952
            rotation = left
            hide_name = True
            size = 60, 20
        ]

        tag Goto120 {
            value = "VcapCr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 9712, 7952
            rotation = left
            hide_name = True
            size = 60, 20
        ]

        tag Goto121 {
            value = "Vdcr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 10072, 8248
            rotation = right
            hide_name = True
            size = 60, 20
        ]

        tag Goto122 {
            value = "Idcr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 10020, 8072
            hide_name = True
            size = 60, 20
        ]

        tag From91 {
            value = "Va_gridr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6968, 7272
            hide_name = True
            size = 60, 20
        ]

        tag From92 {
            value = "Vb_gridr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6968, 7320
            hide_name = True
            size = 60, 20
        ]

        tag From93 {
            value = "Vc_gridr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6968, 7368
            hide_name = True
            size = 58, 20
        ]

        tag Goto123 {
            value = "theta_gridr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7212, 7348
            hide_name = True
            size = 60, 20
        ]

        tag Goto124 {
            value = "Vd_gridr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7160, 7260
            hide_name = True
            size = 60, 20
        ]

        tag Goto125 {
            value = "Vq_gridr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7160, 7288
            hide_name = True
            size = 60, 20
        ]

        tag From94 {
            value = "Iar"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6984, 7432
            hide_name = True
            size = 60, 20
        ]

        tag From87 {
            value = "Ibr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6984, 7460
            hide_name = True
            size = 60, 20
        ]

        tag From88 {
            value = "Icr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6984, 7492
            hide_name = True
            size = 58, 20
        ]

        tag From89 {
            value = "theta_gridr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6984, 7520
            hide_name = True
            size = 60, 20
        ]

        tag Goto71 {
            value = "Idr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7160, 7444
            hide_name = True
            size = 60, 20
        ]

        tag Goto72 {
            value = "Iqr"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7160, 7476
            hide_name = True
            size = 60, 20
        ]

        tag Goto126 {
            value = "w_f"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7156, 7552
            hide_name = True
            size = 60, 20
        ]

        tag From95 {
            value = "Vdcr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7000, 7648
            hide_name = True
            size = 60, 20
        ]

        tag Goto127 {
            value = "I_fd*"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7292, 7628
            hide_name = True
            size = 60, 20
        ]

        tag From96 {
            value = "Vd_gridr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 7344
            hide_name = True
            size = 60, 20
        ]

        tag From97 {
            value = "Idr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 7448
            hide_name = True
            size = 60, 20
        ]

        tag From98 {
            value = "Iqr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7432, 7552
            hide_name = True
            size = 60, 20
        ]

        tag From99 {
            value = "I_fd*"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 7408
            hide_name = True
            size = 60, 20
        ]

        tag From100 {
            value = "w_f"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7432, 7584
            hide_name = True
            size = 60, 20
        ]

        tag Goto128 {
            value = "V_fd*"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7932, 7484
            hide_name = True
            size = 60, 20
        ]

        tag From101 {
            value = "Vq_gridr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 8024, 7344
            hide_name = True
            size = 60, 20
        ]

        tag From102 {
            value = "Iqr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 8024, 7448
            hide_name = True
            size = 60, 20
        ]

        tag From103 {
            value = "Idr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 8028, 7552
            hide_name = True
            size = 60, 20
        ]

        tag From105 {
            value = "w_f"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 8028, 7584
            hide_name = True
            size = 60, 20
        ]

        tag Goto129 {
            value = "V_fq*"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8528, 7484
            hide_name = True
            size = 60, 20
        ]

        tag From106 {
            value = "theta_gridr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 8624, 7528
            hide_name = True
            size = 60, 20
        ]

        tag From107 {
            value = "V_fd*"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 8620, 7424
            hide_name = True
            size = 60, 20
        ]

        tag From108 {
            value = "V_fq*"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 8620, 7456
            hide_name = True
            size = 60, 20
        ]

        tag From109 {
            value = "Vdcr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 8788, 7532
            hide_name = True
            size = 60, 20
        ]

        tag Goto130 {
            value = "V_abc*"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 9004, 7500
            hide_name = True
            size = 60, 20
        ]

        tag From110 {
            value = "VcapAr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6976, 7788
            hide_name = True
            size = 60, 20
        ]

        tag From111 {
            value = "VcapBr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6976, 7824
            hide_name = True
            size = 60, 20
        ]

        tag From112 {
            value = "VcapCr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6976, 7856
            hide_name = True
            size = 60, 20
        ]

        tag From113 {
            value = "IarmsAr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6976, 7896
            hide_name = True
            size = 60, 20
        ]

        tag From114 {
            value = "IarmsBr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6976, 7932
            hide_name = True
            size = 60, 20
        ]

        tag From115 {
            value = "IarmsCr"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6976, 7964
            hide_name = True
            size = 60, 20
        ]

        tag Goto131 {
            value = "VcA"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7300, 7796
            hide_name = True
            size = 60, 20
        ]

        tag Goto132 {
            value = "VcB"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7300, 7824
            hide_name = True
            size = 60, 20
        ]

        tag Goto133 {
            value = "VcC"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7300, 7852
            hide_name = True
            size = 60, 20
        ]

        tag Goto134 {
            value = "IarmA"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7300, 7908
            hide_name = True
            size = 60, 20
        ]

        tag Goto135 {
            value = "IarmB"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7300, 7932
            hide_name = True
            size = 60, 20
        ]

        tag Goto136 {
            value = "IarmC"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7300, 7956
            hide_name = True
            size = 60, 20
        ]

        tag From116 {
            value = "V_abc*"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 6984, 8040
            hide_name = True
            size = 60, 20
        ]

        tag From118 {
            value = "IarmA"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 7924
            hide_name = True
            size = 60, 20
        ]

        tag Goto137 {
            value = "Va*"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7160, 8012
            hide_name = True
            size = 60, 20
        ]

        tag Goto138 {
            value = "Vb*"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7160, 8040
            hide_name = True
            size = 60, 20
        ]

        tag Goto139 {
            value = "Vc*"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7160, 8068
            hide_name = True
            size = 60, 20
        ]

        tag From119 {
            value = "Va*"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 7748
            hide_name = True
            size = 60, 20
        ]

        tag From120 {
            value = "VcA"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 7840
            hide_name = True
            size = 60, 20
        ]

        tag Goto140 {
            value = "SwA+"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7968, 7776
            hide_name = True
            size = 60, 20
        ]

        tag Goto141 {
            value = "SwA-"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7968, 7892
            hide_name = True
            size = 60, 20
        ]

        tag From121 {
            value = "IarmB"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 8168
            hide_name = True
            size = 60, 20
        ]

        tag From122 {
            value = "Vb*"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 7992
            hide_name = True
            size = 60, 20
        ]

        tag From123 {
            value = "VcB"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 8084
            hide_name = True
            size = 60, 20
        ]

        tag Goto142 {
            value = "SwB+"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7968, 8020
            hide_name = True
            size = 60, 20
        ]

        tag Goto143 {
            value = "SwB-"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7968, 8136
            hide_name = True
            size = 60, 20
        ]

        tag From124 {
            value = "IarmC"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 8424
            hide_name = True
            size = 60, 20
        ]

        tag From125 {
            value = "Vc*"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 8248
            hide_name = True
            size = 60, 20
        ]

        tag From126 {
            value = "VcC"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 7428, 8340
            hide_name = True
            size = 60, 20
        ]

        tag Goto144 {
            value = "SwC+"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7968, 8276
            hide_name = True
            size = 60, 20
        ]

        tag Goto145 {
            value = "SwC-"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 7968, 8392
            hide_name = True
            size = 60, 20
        ]

        tag Goto146 {
            value = "SwA"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8084, 7836
            hide_name = True
            size = 60, 20
        ]

        tag Goto147 {
            value = "SwB"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8084, 8080
            hide_name = True
            size = 60, 20
        ]

        tag Goto148 {
            value = "SwC"
            scope = global
            kind = sp
            direction = in
        }
        [
            position = 8084, 8340
            hide_name = True
            size = 60, 20
        ]

        tag From127 {
            value = "SwA"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 9016, 8392
            rotation = left
            hide_name = True
            size = 60, 20
        ]

        tag From128 {
            value = "SwB"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 9380, 8392
            rotation = left
            hide_name = True
            size = 60, 20
        ]

        tag From129 {
            value = "SwC"
            scope = global
            kind = sp
            direction = out
        }
        [
            position = 9752, 8392
            rotation = left
            hide_name = True
            size = 60, 20
        ]

        junction Junction1 pe
        [
            position = 9912, 8104
        ]

        junction Junction2 pe
        [
            position = 9912, 8296
        ]

        junction Junction3 pe
        [
            position = 8320, 8416
        ]

        junction Junction4 pe
        [
            position = 8372, 8512
        ]

        junction Junction5 pe
        [
            position = 8424, 8608
        ]

        junction Junction6 pe
        [
            position = 8372, 8712
        ]

        junction Junction7 pe
        [
            position = 8320, 8712
        ]

        junction Junction8 pe
        [
            position = 8720, 8416
        ]

        junction Junction9 pe
        [
            position = 8764, 8512
        ]

        junction Junction10 pe
        [
            position = 8808, 8608
        ]

        junction Junction11 pe
        [
            position = 8424, 8712
        ]

        junction Junction12 pe
        [
            position = 8764, 8712
        ]

        junction Junction13 pe
        [
            position = 8720, 8712
        ]

        junction Junction901 sp
        [
            position = 8976, 8008
        ]

        junction Junction902 sp
        [
            position = 9056, 8008
        ]

        junction Junction903 sp
        [
            position = 9340, 8008
        ]

        junction Junction904 sp
        [
            position = 9420, 8008
        ]

        junction Junction905 sp
        [
            position = 9712, 8008
        ]

        junction Junction906 sp
        [
            position = 9792, 8008
        ]

        junction Junction907 pe
        [
            position = 10032, 8104
        ]

        junction Junction908 pe
        [
            position = 10032, 8296
        ]

        junction Junction909 sp
        [
            position = 7492, 7448
        ]

        junction Junction910 sp
        [
            position = 7576, 7428
        ]

        junction Junction911 sp
        [
            position = 8088, 7448
        ]

        junction Junction912 sp
        [
            position = 8172, 7428
        ]

        junction Junction913 sp
        [
            position = 7764, 7780
        ]

        junction Junction926 sp
        [
            position = 7924, 7776
        ]

        junction Junction927 sp
        [
            position = 7924, 7892
        ]

        junction Junction928 sp
        [
            position = 7924, 8020
        ]

        junction Junction929 sp
        [
            position = 7924, 8136
        ]

        junction Junction930 sp
        [
            position = 7924, 8276
        ]

        junction Junction931 sp
        [
            position = 7924, 8392
        ]

        junction Junction932 sp
        [
            position = 7764, 7896
        ]

        junction Junction933 sp
        [
            position = 7552, 7748
        ]

        junction Junction934 sp
        [
            position = 7764, 8020
        ]

        junction Junction935 sp
        [
            position = 7552, 7992
        ]

        junction Junction936 sp
        [
            position = 7764, 8156
        ]

        junction Junction937 sp
        [
            position = 7764, 8280
        ]

        junction Junction938 sp
        [
            position = 7552, 8248
        ]

        junction Junction939 sp
        [
            position = 7764, 8400
        ]

        comment Comment9 START <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Arial'; font-size:12pt; font-weight:400; font-style:normal;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">Voltage controller</span></p></body></html> ENDCOMMENT 
        [
            position = 7056, 7668
        ]

        comment Comment10 START <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Arial'; font-size:12pt; font-weight:400; font-style:normal;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">Id controller</span> </p></body></html> ENDCOMMENT 
        [
            position = 7580, 7596
        ]

        comment Comment11 START <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Arial'; font-size:12pt; font-weight:400; font-style:normal;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt;">Iq controller</span> </p></body></html> ENDCOMMENT 
        [
            position = 8176, 7596
        ]

        connect Rar.p_node Lar.n_node as Connection5620
        connect Rar1.p_node Lar1.n_node as Connection5622
        connect Rar2.p_node Lar2.n_node as Connection5623
        connect "MMC Leg - Rectifier C2.DC+" Junction1 as Connection5631
        connect "Electric Tag1" Junction1 as Connection5633
        connect "MMC Leg - Rectifier C2.DC-" Junction2 as Connection5634
        connect "Electric Tag2" Junction2 as Connection5636
        connect "Electric Tag4" "MMC Leg - Rectifier C.DC+" as Connection5637
        connect "Electric Tag3" "MMC Leg - Rectifier C1.DC+" as Connection5638
        connect "Electric Tag6" "MMC Leg - Rectifier C.DC-" as Connection5639
        connect "Electric Tag5" "MMC Leg - Rectifier C1.DC-" as Connection5640
        connect Vgen_gridr.a_node Junction3 as Connection5641
        connect Vag.p_node Junction3 as Connection5643
        connect Vgen_gridr.b_node Junction4 as Connection5644
        connect Vbg.p_node Junction4 as Connection5646
        connect Vgen_gridr.c_node Junction5 as Connection5647
        connect Vcg.p_node Junction5 as Connection5649
        [
            breakpoints = 8416, 8608; 8416, 8608
        ]
        connect Vag.n_node Junction6 as Connection5651
        [
            breakpoints = 8360, 8712
        ]
        connect Vbg.n_node Junction7 as Connection5654
        connect Junction7 Junction6 as Connection5655
        connect Vgen_gridr.n_node Junction7 as Connection5656
        connect Vag.out Goto105 as Connection5657
        connect Goto106 Vbg.out as Connection5658
        connect Vcg.out Goto107 as Connection5659
        connect Junction3 Ia.p_node as Connection5660
        connect Ia.n_node Lar.p_node as Connection5661
        connect Junction4 Ib.p_node as Connection5662
        connect Ib.n_node Lar1.p_node as Connection5663
        connect Junction5 Ic.p_node as Connection5664
        connect Ic.n_node Lar2.p_node as Connection5665
        connect Ic.out Goto110 as Connection5666
        connect Ib.out Goto109 as Connection5667
        connect Ia.out Goto108 as Connection5668
        connect "MMC Leg - Rectifier C.Vac" Junction8 as Connection5672
        [
            breakpoints = 8936, 8200; 8936, 8416
        ]
        connect Junction8 Rar.n_node as Connection5673
        connect Va.p_node Junction8 as Connection5674
        connect Rar1.n_node Junction9 as Connection5675
        [
            breakpoints = 8648, 8512
        ]
        connect Junction9 "MMC Leg - Rectifier C1.Vac" as Connection5676
        [
            breakpoints = 9300, 8512; 9300, 8200
        ]
        connect Vb.p_node Junction9 as Connection5677
        connect Rar2.n_node Junction10 as Connection5678
        connect Junction10 "MMC Leg - Rectifier C2.Vac" as Connection5679
        connect Vc.p_node Junction10 as Connection5680
        connect Junction6 Junction11 as Connection5681
        connect Junction11 Vcg.n_node as Connection5682
        connect Vc.n_node Junction12 as Connection5684
        connect Vb.n_node Junction12 as Connection5686
        connect Junction12 Junction13 as Connection5687
        connect Junction13 Junction11 as Connection5688
        connect Va.n_node Junction13 as Connection5689
        connect Va.out Goto114 as Connection5690
        connect Vb.out Goto115 as Connection5691
        connect Vc.out Goto116 as Connection5692
        connect "Bus Split4.out1" VcdownAr.in as Connection7033
        connect "Bus Split4.out" VcupAr.in as Connection7034
        connect Goto10 Junction901 as Connection7035
        connect "Bus Split4.in" Junction901 as Connection7037
        connect Junction901 "MMC Leg - Rectifier C.Vc" as Connection7039
        connect "Bus Split5.out1" IdownAr.in as Connection7040
        connect "Bus Split5.out" IupAr.in as Connection7041
        connect "MMC Leg - Rectifier C.Ia" Junction902 as Connection7043
        connect Junction902 Goto9 as Connection7044
        connect "Bus Split5.in" Junction902 as Connection7045
        connect "Bus Split6.out1" VcdownBr.in as Connection7046
        connect "Bus Split6.out" VcupBr.in as Connection7047
        connect Goto118 Junction903 as Connection7048
        connect "Bus Split6.in" Junction903 as Connection7049
        connect "Bus Split7.out1" IdownBr.in as Connection7050
        connect "Bus Split7.out" IupBr.in as Connection7051
        connect Junction904 Goto117 as Connection7052
        connect "Bus Split7.in" Junction904 as Connection7053
        connect "Bus Split8.out1" VcdownCr.in as Connection7054
        connect "Bus Split8.out" VcupCr.in as Connection7055
        connect Goto120 Junction905 as Connection7056
        connect "Bus Split8.in" Junction905 as Connection7057
        connect "Bus Split9.out1" IdownCr.in as Connection7058
        connect "Bus Split9.out" IupCr.in as Connection7059
        connect Junction906 Goto119 as Connection7060
        connect "Bus Split9.in" Junction906 as Connection7061
        connect "MMC Leg - Rectifier C2.Ia" Junction906 as Connection7062
        connect "MMC Leg - Rectifier C2.Vc" Junction905 as Connection7063
        connect "MMC Leg - Rectifier C1.Ia" Junction904 as Connection7064
        connect "MMC Leg - Rectifier C1.Vc" Junction903 as Connection7065
        connect Goto121 Vdcr.out as Connection5553
        connect Junction1 Idcr.p_node as Connection7066
        connect Idcr.n_node Junction907 as Connection7068
        connect Junction907 Rdc.p_node as Connection7069
        connect Vdcr.p_node Junction907 as Connection7070
        connect Junction2 Junction908 as Connection7071
        connect Junction908 Rdc.n_node as Connection7072
        connect Vdcr.n_node Junction908 as Connection7073
        connect Idcr.out Goto122 as Connection7074
        connect From92 "Three phase PLL7.vb" as Connection7205
        connect From91 "Three phase PLL7.va" as Connection7206
        connect From93 "Three phase PLL7.vc" as Connection7207
        connect "Three phase PLL7.d_axis" Goto124 as Connection7208
        connect "Three phase PLL7.q_axis" Goto125 as Connection7209
        connect "Three phase PLL7.theta" Abs2.in as Connection7210
        connect Abs2.out Goto123 as Connection7211
        connect "Three phase PLL7.sin_theta" Termination7.in as Connection7212
        connect Termination8.in "Three phase PLL7.zero_axis" as Connection7213
        connect "Three phase PLL7.freq" Termination9.in as Connection7214
        connect From94 "abc to dq2.va" as Connection4990
        connect From87 "abc to dq2.vb" as Connection4991
        connect From88 "abc to dq2.vc" as Connection4992
        connect From89 "abc to dq2.wt" as Connection6504
        connect "abc to dq2.zero_axis" Termination2.in as Connection7215
        connect "abc to dq2.q_axis" Goto72 as Connection7216
        connect "abc to dq2.d_axis" Goto71 as Connection7217
        connect Constant1.out Goto126 as Connection7218
        connect Sum1.in Constant2.out as Connection7219
        connect From95 Sum1.in1 as Connection7220
        connect Sum1.out Gain1.in as Connection7221
        connect Gain1.out "PID controller1.in" as Connection7222
        connect "PID controller1.out" Goto127 as Connection7223
        connect From99 Sum2.in as Connection7224
        connect From100 Product1.in1 as Connection7226
        connect From98 Product1.in as Connection7227
        connect Product1.out Gain2.in as Connection7228
        connect Gain2.out Sum3.in1 as Connection7229
        connect Sum3.out Sum4.in2 as Connection7230
        connect From96 Sum4.in as Connection7231
        connect Sum4.out Goto128 as Connection7232
        connect Gain3.out Sum3.in as Connection7233
        connect From97 Junction909 as Connection7234
        connect Junction909 Sum2.in1 as Connection7235
        connect Gain3.in Junction909 as Connection7236
        connect Sum2.out Junction910 as Connection7238
        connect Junction910 Gain5.in as Connection7239
        connect Gain4.in Junction910 as Connection7240
        connect Gain4.out Integrator1.in as Connection7241
        connect Gain5.out Sum5.in as Connection7242
        connect Integrator1.out Sum5.in1 as Connection7243
        connect Sum5.out Sum4.in1 as Connection7244
        [
            breakpoints = 7796, 7420; 7796, 7484
        ]
        connect From105 Product2.in1 as Connection7246
        connect From103 Product2.in as Connection7247
        connect Product2.out Gain6.in as Connection7248
        connect Gain6.out Sum7.in1 as Connection7249
        connect Sum7.out Sum8.in2 as Connection7250
        connect From101 Sum8.in as Connection7251
        connect Sum8.out Goto129 as Connection7252
        connect Gain7.out Sum7.in as Connection7253
        connect From102 Junction911 as Connection7254
        connect Junction911 Sum6.in1 as Connection7255
        connect Gain7.in Junction911 as Connection7256
        connect Sum6.out Junction912 as Connection7257
        connect Junction912 Gain9.in as Connection7258
        connect Gain8.in Junction912 as Connection7259
        connect Gain8.out Integrator2.in as Connection7260
        connect Gain9.out Sum9.in as Connection7261
        connect Integrator2.out Sum9.in1 as Connection7262
        connect Sum9.out Sum8.in1 as Connection7263
        [
            breakpoints = 8392, 7420; 8392, 7484
        ]
        connect Constant3.out Sum6.in as Connection7264
        connect Constant11.out "dq to abc1.zero_input" as Connection4265
        connect From107 "dq to abc1.d_input" as Connection7265
        connect From108 "dq to abc1.q_input" as Connection7266
        connect From106 "dq to abc1.wt" as Connection7267
        connect From109 Product3.in1 as Connection7268
        connect "dq to abc1.phase_b" "Bus Join1.in1" as Connection7269
        connect "dq to abc1.phase_a" "Bus Join1.in" as Connection7270
        connect "dq to abc1.phase_c" "Bus Join1.in2" as Connection7271
        connect "Bus Join1.out" Product3.in as Connection7272
        connect Product3.out Limit1.in as Connection7273
        connect Limit1.out Goto130 as Connection7274
        [
            breakpoints = 8964, 7500
        ]
        connect From110 "Bus Join2.in" as Connection7275
        connect From111 "Bus Join2.in1" as Connection7276
        connect From112 "Bus Join2.in2" as Connection7277
        connect "Bus Join2.out" Delay1.in as Connection7278
        connect From113 "Bus Join3.in" as Connection7279
        connect From114 "Bus Join3.in1" as Connection7280
        connect From115 "Bus Join3.in2" as Connection7281
        connect "Bus Join3.out" Delay2.in as Connection7282
        connect Delay1.out "Bus Split10.in" as Connection7283
        connect Delay2.out "Bus Split11.in" as Connection7284
        connect "Bus Split10.out1" Goto132 as Connection7285
        connect "Bus Split10.out" Goto131 as Connection7286
        connect "Bus Split10.out2" Goto133 as Connection7287
        connect "Bus Split11.out1" Goto135 as Connection7288
        connect "Bus Split11.out2" Goto136 as Connection7289
        connect "Bus Split11.out" Goto134 as Connection7290
        connect From116 "Bus Split12.in" as Connection7291
        connect "Bus Split12.out1" Goto138 as Connection7293
        connect "Bus Split12.out" Goto137 as Connection7294
        connect "Bus Split12.out2" Goto139 as Connection7295
        connect Gain11.out PWMa1.m as Connection7297
        connect PWMa1.sw Junction913 as Connection7302
        connect Junction913 "Logical operator1.in" as Connection7303
        connect "Bus Join4.in" Junction913 as Connection7304
        [
            breakpoints = 7848, 7748; 7764, 7748
        ]
        connect "Logical operator1.out" "Bus Join4.in1" as Connection7305
        connect "Logical operator2.out" "Bus Join5.in1" as Connection7314
        connect From120 "Bus Split13.in" as Connection7352
        connect From118 "Bus Split14.in" as Connection7353
        connect "Bus Split14.out" PWMa1.Ic as Connection7355
        [
            breakpoints = 7604, 7896; 7604, 7796
        ]
        connect "Bus Split13.out" PWMa1.Vc as Connection7362
        [
            breakpoints = 7580, 7832; 7580, 7780
        ]
        connect "Logical operator3.out" "Bus Join6.in1" as Connection7368
        connect "Logical operator4.out" "Bus Join7.in1" as Connection7373
        connect From123 "Bus Split15.in" as Connection7374
        connect From121 "Bus Split16.in" as Connection7375
        connect "Logical operator5.out" "Bus Join8.in1" as Connection7388
        connect "Logical operator6.out" "Bus Join9.in1" as Connection7393
        connect From126 "Bus Split17.in" as Connection7394
        connect From124 "Bus Split18.in" as Connection7395
        connect "Bus Join4.out" Junction926 as Connection7403
        connect Junction926 Goto140 as Connection7404
        connect "Bus Join10.in" Junction926 as Connection7405
        connect "Bus Join5.out" Junction927 as Connection7406
        connect Junction927 Goto141 as Connection7407
        connect "Bus Join10.in1" Junction927 as Connection7408
        connect "Bus Join10.out" Goto146 as Connection7409
        connect "Bus Join11.out" Goto147 as Connection7410
        connect "Bus Join12.out" Goto148 as Connection7411
        connect "Bus Join6.out" Junction928 as Connection7412
        connect Junction928 Goto142 as Connection7413
        connect "Bus Join11.in" Junction928 as Connection7414
        connect "Bus Join7.out" Junction929 as Connection7415
        connect Junction929 Goto143 as Connection7416
        connect "Bus Join11.in1" Junction929 as Connection7417
        connect "Bus Join8.out" Junction930 as Connection7418
        connect Junction930 Goto144 as Connection7419
        connect "Bus Join12.in" Junction930 as Connection7420
        connect "Bus Join9.out" Junction931 as Connection7421
        connect Junction931 Goto145 as Connection7422
        connect "Bus Join12.in1" Junction931 as Connection7423
        connect From127 "MMC Leg - Rectifier C.Su" as Connection7424
        connect From128 "MMC Leg - Rectifier C1.Su" as Connection7425
        connect From129 "MMC Leg - Rectifier C2.Su" as Connection7426
        connect "Logical operator2.in" Junction932 as Connection7436
        connect Junction932 "Bus Join5.in" as Connection7437
        [
            breakpoints = 7764, 7896; 7764, 7864; 7848, 7864
        ]
        connect PWMa2.sw Junction932 as Connection7438
        connect From119 Junction933 as Connection7439
        connect Junction933 Gain11.in as Connection7440
        connect PWMa2.m Junction933 as Connection7441
        connect PWMa2.Vc "Bus Split13.out1" as Connection7442
        connect PWMa2.Ic "Bus Split14.out1" as Connection7443
        connect "Logical operator3.in" Junction934 as Connection7444
        [
            breakpoints = 7764, 8024
        ]
        connect Junction934 "Bus Join6.in" as Connection7445
        [
            breakpoints = 7764, 7992; 7848, 7992
        ]
        connect PWMb1.sw Junction934 as Connection7446
        connect Gain12.out PWMb1.m as Connection7447
        connect PWMb1.Vc "Bus Split15.out" as Connection7448
        connect PWMb1.Ic "Bus Split16.out" as Connection7449
        [
            breakpoints = 7560, 8044; 7560, 8160
        ]
        connect From122 Junction935 as Connection7450
        connect Junction935 Gain12.in as Connection7451
        connect PWMb2.m Junction935 as Connection7452
        [
            breakpoints = 7552, 8132; 7552, 7992
        ]
        connect "Bus Split15.out1" PWMb2.Vc as Connection7453
        connect "Bus Split16.out1" PWMb2.Ic as Connection7454
        connect "Bus Join7.in" Junction936 as Connection7455
        [
            breakpoints = 7848, 8108; 7764, 8108; 7764, 8140
        ]
        connect Junction936 "Logical operator4.in" as Connection7456
        connect PWMb2.sw Junction936 as Connection7457
        connect "Bus Join8.in" Junction937 as Connection7458
        [
            breakpoints = 7848, 8248; 7764, 8248
        ]
        connect Junction937 "Logical operator5.in" as Connection7459
        [
            breakpoints = 7764, 8280
        ]
        connect PWMc1.sw Junction937 as Connection7460
        connect PWMc1.m Gain13.out as Connection7461
        connect PWMc1.Vc "Bus Split17.out" as Connection7462
        connect PWMc1.Ic "Bus Split18.out" as Connection7463
        [
            breakpoints = 7556, 8304; 7556, 8416
        ]
        connect PWMc2.Vc "Bus Split17.out1" as Connection7467
        connect "Bus Split18.out1" PWMc2.Ic as Connection7468
        connect Gain13.in Junction938 as Connection7470
        connect Junction938 From125 as Connection7471
        connect PWMc2.m Junction938 as Connection7472
        connect "Bus Join9.in" Junction939 as Connection7473
        [
            breakpoints = 7848, 8364; 7764, 8364; 7764, 8396
        ]
        connect Junction939 "Logical operator6.in" as Connection7474
        connect PWMc2.sw Junction939 as Connection7475
        [
            breakpoints = 7764, 8400
        ]
    }

    logically_deleted {
        "PWMa1.SortUP4"
        "PWMa2.SortUP4"
        "PWMb1.SortUP4"
        "PWMb2.SortUP4"
        "PWMc1.SortUP4"
        "PWMc2.SortUP4"
    }

    default {
        "core/Abs" {
            execution_rate = "inherit"
        }

        "core/Bus Join" {
            inputs = "2"
            execution_rate = "inherit"
        }

        "core/Bus Split" {
            outputs = "2"
            execution_rate = "inherit"
        }

        "core/C function" {
            input_terminals = "real in;"
            input_terminals_show_labels = "False;"
            input_terminals_feedthrough = "True;"
            input_terminals_dimensions = "inherit;"
            output_terminals = "real out;"
            output_terminals_show_labels = "False;"
            output_terminals_feedthrough = "True;"
            output_terminals_dimensions = "inherit;"
            output_fnc = ""
            update_fnc = ""
            init_fnc = ""
            global_variables = ""
            parameters = ""
            library_load_type = "Compile-time load"
            dll_file_path = ""
            dll_file_path_full = ""
            arm_a9_file_path = ""
            arm_a9_file_path_full = ""
            arm_a53_file_path = ""
            arm_a53_file_path_full = ""
            h_file_path = ""
            h_file_path_full = ""
            add_src_path = ""
            add_src_path_full = ""
            convert_to_relative_dll = "True"
            convert_to_relative_a = "True"
            convert_to_relative_src = "True"
            arb_defs = ""
            add_macros = ""
            skip_pre_cmpl_check = "False"
            generate_for_hil = "True"
            execution_rate = "inherit"
            _supported_platforms = "[\'generic\']"
            refresh = "refresh"
        }

        "core/Constant" {
            value = "1"
            signal_type = "real"
            execution_rate = "100e-6"
            _tunable = "False"
        }

        "core/Delay" {
            delay_type = "Fixed delay"
            del_length = "2"
            max_delay_length = "20"
            init_value = "0"
            signal_out_type = "inherit"
            execution_rate = "inherit"
        }

        "core/Gain" {
            gain = "1"
            multiplication = "Element-wise(K.*u)"
            _tunable = "False"
            execution_rate = "inherit"
        }

        "core/Inductor" {
            signal_access = "inherit"
            inductance = "1e-3"
            initial_current = "0.0"
            pole_shift_ignore = "False"
            visible = "True"
        }

        "core/Integrator" {
            show_reset = "none"
            reset_type = "asynchronous"
            show_init_condition = "internal"
            init_value = "0"
            limit_output = "False"
            limit_upper = "inf"
            limit_lower = "-inf"
            show_state = "False"
            state_port_type = "inherit"
            execution_rate = "inherit"
        }

        "core/Limit" {
            upper_limit = "[\'inf\']"
            lower_limit = "[\'-inf\']"
            execution_rate = "inherit"
        }

        "core/Logical operator" {
            operator = "AND"
            inputs = "2"
            execution_rate = "inherit"
        }

        "core/PID controller" {
            controller_type = "PID"
            kp = "1"
            kp_source = "internal"
            ki = "1"
            ki_source = "internal"
            kd = "0"
            kd_source = "internal"
            filt_coef = "100"
            int_init_value = "0"
            filt_init_value = "0"
            enb_output_limit_out = "False"
            show_reset = "none"
            upper_sat_lim = "1"
            upper_sat_lim_source = "internal"
            lower_sat_lim = "-1"
            lower_sat_lim_source = "internal"
            enb_anti_windup_out = "False"
            signal_out_type = "inherit"
            _tunable = "False"
            execution_rate = "inherit"
        }

        "core/Probe" {
            signal_access = "inherit"
            addr = "0"
            override_signal_name = "False"
            signal_name = ""
            signal_type = "generic"
            streaming_en = "False"
            streaming_er_idx = "0"
            execution_rate = "inherit"
        }

        "core/Product" {
            signs = "2"
            execution_rate = "inherit"
        }

        "core/Relational operator" {
            relational_op = "=="
            execution_rate = "inherit"
        }

        "core/Resistor" {
            resistance = "1"
            param_set = ""
        }

        "core/Signal switch" {
            criterion = "ctrl > threshold"
            threshold = "0.5"
            execution_rate = "inherit"
        }

        "core/Sum" {
            signs = "2"
            execution_rate = "inherit"
        }

        "core/Termination" {
            execution_rate = "inherit"
        }

        "core/Triangular Wave Source" {
            min_val = "-0.5"
            max_val = "0.5"
            frequency = "50"
            duty_cycle = "0.5"
            phase = "0"
            execution_rate = "100e-6"
            _tunable = "False"
        }

        "core/Current Measurement" {
            signal_access = "inherit"
            bw_limit = "False"
            frequency = "10e3"
            comparator_enable = "False"
            operator = "greater"
            threshold = "0"
            cmp_abs_value = "False"
            feed_forward = "false"
            sig_output = "False"
            sig_output_filt_and_full_bw = "False"
            execution_rate = "100e-6"
            addr = "0"
            nd_msr_estimation = "false"
            dev_cpl_msr = "false"
            host_device = "0"
            output_to_device = "0"
            dev_cpl_index = "0"
            dev_cpl_var_nb = "0"
            visible = "True"
            override_signal_name = "False"
            signal_name = ""
        }

        "core/Half Bridge" {
            signal_access = "inherit"
            model_type = "Global GDS oversampling"
            ctrl_src = "Digital input per switch"
            op_mode = "Fixed carrier frequency"
            carrier_freq = "10000.0"
            phase_op_mode = "Fixed carrier phase offset"
            carr_ph_offset = "0.0"
            d_time = "5e-6"
            ref_sig_min_max = "[-1.0, 1.0]"
            load_mode = "on min"
            execution_rate = "inherit"
            S_top = "1"
            S_top_logic = "active high"
            S_bot = "2"
            S_bot_logic = "active high"
            S_top_I = "False"
            S_bot_I = "False"
            _control_property = "all high"
            switches_names_at_mask = "[]"
            pwm_enabling = "False"
            pwm_enable_di = "13"
            pwm_enable_inv = "active high"
            delay_enabled = "False"
            fixed_delay = "1e-6"
            var_delay_lut = "[-10.0, 1e-6, 10.0, 1e-6]"
            preview_var_delay = "Preview"
            vout_cmp_pullup_mode = "False"
            vout_cmp_timeout = "5e-6"
            show_monitoring = "False"
            fvd = "False"
            losses_estimation = "False"
            fvd_def_method = "Voltage and Resistance"
            Import_igbt_xml = "not selected"
            Import_diode_xml = "not selected"
            Switch_type = "IGBT"
            Vce = "1.3"
            Rce = "0"
            Vd = "1.2"
            Rd = "0"
            i_sw = "[0.0, 6.0, 12.0, 18.0, 24.0]"
            v_sw = "[0.0, 600.0]"
            temp_sw = "[25.0, 50.0, 75.0, 100.0, 125.0]"
            vce_table_out = "[1.3, 1.3, 1.3, 1.3, 1.3]"
            vd_table_out = "[1.2, 1.2, 1.2, 1.2, 1.2]"
            et_on_table_out = "[[0.0, 0.0275e-3, 0.15e-3, 0.275e-3, 0.3e-3], [0.35*3.8e-3, 0.4*3.8e-3, 0.8*3.8e-3, 0.68*3.8e-3, 0.9*3.8e-3], [0.65*3.8e-3, 0.9*3.8e-3, 1.2*3.8e-3, 1.5*3.8e-3, 1.7*3.8e-3], [0.9*3.8e-3, 1.3*3.8e-3, 1.7*3.8e-3, 1.9*3.8e-3, 2.25*3.8e-3], [1.1*3.8e-3, 1.7*3.8e-3, 2.1*3.8e-3, 2.3*3.8e-3, 2.5*3.8e-3]]"
            et_off_table_out = "[[0.0, 0.0275e-3, 0.15e-3, 0.275e-3, 0.3e-3], [0.35*2.1e-3, 0.4*2.1e-3, 0.8*2.1e-3, 0.68*2.1e-3, 0.9*2.1e-3], [0.65*2.1e-3, 0.9*2.1e-3, 1.2*2.1e-3, 1.5*2.1e-3, 1.7*2.1e-3], [0.9*2.1e-3, 1.3*2.1e-3, 1.7*2.1e-3, 1.9*2.1e-3, 2.25*2.1e-3], [1.1*2.1e-3, 1.7*2.1e-3, 2.1*2.1e-3, 2.3*2.1e-3, 2.5*2.1e-3]]"
            ed_off_table_out = "[[0.0, 0.0275e-3, 0.15e-3, 0.275e-3, 0.3e-3], [0.35*2.2e-3, 0.4*2.2e-3, 0.8*2.2e-3, 0.68*2.2e-3, 0.9*2.2e-3], [0.65*2.2e-3, 0.9*2.2e-3, 1.2*2.2e-3, 1.5*2.2e-3, 1.7*2.2e-3], [0.9*2.2e-3, 1.3*2.2e-3, 1.7*2.2e-3, 1.9*2.2e-3, 2.25*2.2e-3], [1.1*2.2e-3, 1.7*2.2e-3, 2.1*2.2e-3, 2.3*2.2e-3, 2.5*2.2e-3]]"
            temp_estimation = "False"
            thermal_networks_type = "Foster"
            switch_Rth = "[0.159, 0.133, 0.120, 0.038]"
            switch_Tth = "[1.1e-1, 1.56e-2, 1.35e-3, 1.51e-4]"
            switch_Cth = "[0.0029, 0.0097, 0.1068, 0.8500]"
            diode_Rth = "[0.159, 0.133, 0.120, 0.038]"
            diode_Tth = "[1.1e-1, 1.56e-2, 1.35e-3, 1.51e-4]"
            diode_Cth = "[0.0029, 0.0097, 0.1068, 0.8500]"
            loss_exec_rate = "100e-6"
            visualize_luts = "Visualize Lookup Tables"
            show_cnt_out = "False"
            PESB_Optimization = "True"
            dtv_flag_en = "True"
            reserved_parameter1 = "0"
            predictive_diode_turn_off = "False"
        }

        "core/MMC Leg - Switching Function" {
            signal_access = "inherit"
            execution_rate = "20e-6"
            rd = "0.25"
            ld = "30e-3"
            cm = "2e-3"
            init_vol = "0"
            vol_arm = "False"
        }

        "core/Three Phase Voltage Source" {
            init_rms_value = "0.0"
            init_frequency = "50.0"
            init_phase = "0.0"
        }

        "core/Three phase PLL" {
            initial_filter_output = "60"
            wn = "157.0796"
            zeta = "0.707"
            rate_high = "12"
            rate_low = "-12"
            freq_unit = "Hz"
            kp = "100"
            ki = "3200"
            kd = "1"
            N = "714.2857"
            initial_pid_output = "376.99111843"
            up_lim = "1e4"
            low_lim = "-1e4"
            kb = "1"
            power_form = "variant - Clarke\'s original"
            alignment = "-pi/2"
            disable_filter = "False"
            wn_LPFdq = "62.83185307"
            execution_rate = "inherit"
            enable_pk = "False"
            enable_zero = "True"
            enable_sin = "True"
        }

        "core/Voltage Measurement" {
            signal_access = "inherit"
            bw_limit = "False"
            frequency = "10e3"
            comparator_enable = "False"
            operator = "greater"
            threshold = "0"
            cmp_abs_value = "False"
            feed_forward = "false"
            sig_output = "False"
            sig_output_filt_and_full_bw = "False"
            execution_rate = "100e-6"
            addr = "0"
            nd_msr_estimation = "false"
            dev_cpl_msr = "false"
            host_device = "0"
            output_to_device = "0"
            dev_cpl_index = "0"
            dev_cpl_var_nb = "0"
            visible = "True"
            override_signal_name = "False"
            signal_name = ""
        }

        "core/abc to dq" {
            power_form = "variant - Clarke\'s original"
            alignment = "-pi/2"
            disable_filter = "True"
            initial_filter_output = "0"
            wn_LPFdq = "1000"
            execution_rate = "inherit"
            _tunable = "False"
        }

        "core/dq to abc" {
            power_form = "variant - Clarke\'s original"
            alignment = "-pi/2"
            execution_rate = "0"
        }
    }

    CODE model_init
        # Numpy module is imported as 'np'
        # Scipy module is imported as 'sp'
        # The Schematic API is imported as 'mdl'
        # To get the model file path, use 'mdl.get_model_file_path()'
        # To print information to the console, use info()
        
        import numpy as np
        
        # Parameters
        V_gpeak = 2.2e2 * np.sqrt(2)  # peak grid phase voltage (V)
        V_grms = 2.2e2
        f_g = 50  # grid frequency (Hz)
        P = 10e3  # transferred power (W)
        V_dc = 5.5e2 * np.sqrt(2)  # DC bus reference voltage sum (V)
        R_dc = V_dc**2 / P  # DC side resistance (Ohms)
        num_sm = 16  # number of series cells
        V_sm = V_dc / num_sm  # DC capacitor initial voltage (V)
        C_sm = 500e-3  # DC bus capacitance (F)
        C_sm_vector = C_sm * np.ones(num_sm)  # DC bus capacitance vector (F)
        C_sm_vector_less = C_sm * np.ones(num_sm - 1)  # DC bus capacitance vector (F) for less cells
        V_sm_vector = V_sm * np.ones(num_sm)  # DC capacitor initial voltage vector (V)
        V_sm_vector_less = V_sm * np.ones(num_sm - 1)  # DC capacitor initial voltage vector (V) for less cells
        
        # Carrier signal values
        carrier_min = np.arange(0, 1, 1/num_sm)  # Minimum carrier signal values
        carrier_max = np.arange(1/num_sm, 1 + 1/num_sm, 1/num_sm)  # Maximum carrier signal values
        
        # Filter and grid parameters
        L_arm = 10e-3  # Filter inductance (Henries)
        R_arm = 0.1  # Filter winding resistance (Ohms)
        L_g = 10e-3  # Grid equivalent inductance (Henries)
        R_g = 0.001  # Grid equivalent resistance (Ohms)
        
        f_sw = 1000  # Triangle carrier wave frequency (Hz)
        phase_delay = f_sw*np.arange(0, 1/f_sw, 1/(f_sw*num_sm))  # Phase delay
        
        # Equivalent parameters for current control calculations
        L_f = L_g + L_arm / 2  # Filter inductance equivalent
        R_f = R_g + R_arm / 2  # Filter resistance equivalent
        
        # Limitation
        I_f_max = 10000  # maximum current (A)
        
        # Current control
        alpha_f = 100  # cut-off frequency of the PI controller
        R_res_a = 1e-3  # Active damping resistance for resonance elimination
        R_gc_a = alpha_f * L_f - R_f  # active damping coefficient
        K_gc_pd = alpha_f * L_f  # proportional gain for d-axis
        K_gc_id = alpha_f * (R_f + R_gc_a)  # integral gain for d-axis
        K_gc_pq = alpha_f * L_f  # proportional gain for q-axis
        K_gc_iq = alpha_f * (R_f + R_gc_a)  # integral gain for q-axis
        
        # DC-link voltage control
        K_gc_pW = 0.001  # proportional gain
        K_gc_iW = 1  # integral gain
        K_gc_b = 10  # anti-windup
        
        T_HIL = 1 / f_sw / 100  # discretization step-size
        Ts=T_HIL
    ENDCODE
}
