Example #1
0
        /// <summary>
        /// 准备评估所需的电路参数
        /// </summary>
        public override void Prepare()
        {
            //计算电路参数
            DesignCircuitParam();

            math_ICrms_max = 0;
            int m = Configuration.voltageRatio.Length;
            int n = Configuration.powerRatio.Length;

            for (int i = 0; i < m; i++)
            {
                math_Vin = math_Vin_min + (math_Vin_max - math_Vin_min) * Configuration.voltageRatio[i];
                for (int j = 0; j < n; j++)
                {
                    math_P = math_Pfull * Configuration.powerRatio[j]; //改变负载
                    Simulate();
                    //Graph graph = new Graph();
                    //graph.Add(curve_iS, "iS");
                    //graph.Add(curve_iD, "iD");
                    //graph.Draw();
                    math_ICrms_max = Math.Max(math_ICrms_max, math_ICrms);

                    //设置元器件的电路参数(用于评估)
                    dualModule.AddEvalParameters(i, j, math_VSmax, curve_iD.Copy(-1), curve_iS); //采用半桥模块时,第二个开关管波形为-iD
                    inductor.AddEvalParameters(i, j, math_IL, math_ILrip);
                    capacitor.AddEvalParameters(i, j, math_ICrms);
                }
            }

            //设置元器件的设计条件
            dualModule.SetConditions(math_VSmax, math_ISmax, math_fs);
            inductor.SetConditions(math_L, math_ILmax, math_fs);
            capacitor.SetConditions(math_C, math_VCmax, math_ICrms_max);
        }
Example #2
0
        /// <summary>
        /// 准备评估所需的电路参数
        /// </summary>
        public override void Prepare()
        {
            //计算电路参数
            DesignCircuitParam();

            double ILrmax     = 0; //谐振电感电流最大值
            double ILrrms_max = 0; //谐振电感电流有效值最大值
            double VCrmax     = 0; //谐振电容电压最大值
            double ICfrms_max = 0; //滤波电容电流有效值最大值
            double ITsmax     = 0; //变压器副边电流最大值

            //Graph graph1 = new Graph();
            //Graph graph2 = new Graph();
            //Graph graph3 = new Graph();
            int n = Configuration.powerRatio.Length;

            for (int j = 0; j < n; j++)
            {
                math_P = math_Pfull * Configuration.powerRatio[j]; //改变负载
                Simulate();                                        //进行对应负载下的波形模拟
                //graph1.Add(curve_vCr, "vCr_" + j);
                //graph2.Add(curve_iLm, "iLm_" + j);
                //graph2.Add(curve_iLr, "iLr_" + j);
                //graph3.Add(curve_io, "io_" + j);
                ILrmax     = Math.Max(ILrmax, math_ILrmax);
                ILrrms_max = Math.Max(ILrrms_max, math_ILrrms);
                VCrmax     = Math.Max(VCrmax, math_VCrmax);
                ICfrms_max = Math.Max(ICfrms_max, math_ICfrms);
                ITsmax     = Math.Max(ITsmax, math_ITsmax);

                //设置元器件的电路参数(用于评估)
                primaryDualModule.AddEvalParameters(0, j, math_vSp, math_qZVS, curve_iSp, curve_iSp);
                secondaryDualDiodeModule.AddEvalParameters(0, j, math_vSs, curve_iSs, curve_iSs);
                resonantInductor.AddEvalParameters(0, j, math_ILrrms, math_ILrmax * 2);
                transformer.AddEvalParameters(0, j, math_ILrrms, math_ITsrms);
                resonantCapacitor.AddEvalParameters(0, j, math_ILrrms);
                filteringCapacitor.AddEvalParameters(0, j, math_ICfrms);
            }
            //graph1.Draw();
            //graph2.Draw();
            //graph3.Draw();

            //若认为谐振电感集成在变压器中,则不考虑额外谐振电感
            //if (this.isLeakageInductanceIntegrated)
            //{
            //    this.deviceInductorNum = 0;
            //}

            //设置元器件的设计条件
            primaryDualModule.SetConditions(math_VSpmax, ILrmax, math_fs);
            clampingDualDiodeModule.SetConditions(math_VSpmax, ILrmax, math_fs);
            secondaryDualDiodeModule.SetConditions(math_VSsmax, math_n / math_No * ILrmax, math_fs);
            resonantInductor.SetConditions(math_Lr, ILrmax, math_fs);
            transformer.SetConditions(math_P, ILrmax, ITsmax, math_fs, math_n, math_No, math_ψ); //FIXME 磁链是否会变化?
            flyingCapacitor.SetConditions(200 * 1e-6, math_VSpmax, ILrmax);                      //TODO 容值
            resonantCapacitor.SetConditions(math_Cr, VCrmax, ILrrms_max);
            filteringCapacitor.SetConditions(200 * 1e-6, math_VCfmax, ICfrms_max);               //TODO 容值
        }
Example #3
0
        /// <summary>
        /// 准备评估所需的电路参数
        /// </summary>
        public override void Prepare()
        {
            //计算电路参数
            DesignCircuitParam();
            int m = Configuration.voltageRatio.Length;
            int n = Configuration.powerRatio.Length;

            double ILmax      = 0;
            double ILrms_max  = 0;
            double VCrmax     = 0;
            double ICfrms_max = 0;
            double fsmax      = 0;
            double ψmax       = 0;

            //得到用于效率评估的不同输入电压与不同功率点的电路参数
            for (int i = 0; i < m; i++)
            {
                //Graph graph1 = new Graph();
                //Graph graph2 = new Graph();
                //Graph graph3 = new Graph();
                //Graph graph4 = new Graph();
                //Graph graph5 = new Graph();
                math_Vin = math_Vinmin + (math_Vinmax - math_Vinmin) * Configuration.voltageRatio[i];
                for (int j = 0; j < n; j++)
                {
                    math_P = math_Pfull * Configuration.powerRatio[j]; //改变负载
                    Simulate();
                    //graph1.Add(curve_iL, "iLr");
                    //graph2.Add(curve_iSp, "iSp");
                    //graph3.Add(curve_iSs, "iSs");
                    //graph4.Add(curve_iDs, "iDs");
                    //graph5.Add(curve_vCr, "vCr");
                    //记录最大值
                    ILmax      = Math.Max(ILmax, math_ILp);
                    ILrms_max  = Math.Max(ILrms_max, math_ILrms);
                    VCrmax     = Math.Max(VCrmax, math_VCrp);
                    ICfrms_max = Math.Max(ICfrms_max, math_ICfrms);
                    fsmax      = Math.Max(fsmax, math_fs);
                    ψmax       = Math.Max(ψmax, math_ψ);

                    //设置元器件的电路参数(用于评估)
                    primaryDualModule.AddEvalParameters(i, j, math_vSp, math_qZVS, curve_iSp, curve_iSp, math_fs);
                    single.AddEvalParameters(i, j, math_vSs, curve_iSs, math_fs);
                    secondaryDualDiodeModule.AddEvalParameters(i, j, math_vDs, curve_iDs, curve_iDs, math_fs);
                    resonantInductor.AddEvalParameters(i, j, math_ILrms, math_ILp * 2, math_fs);
                    transformer.AddEvalParameters(i, j, math_ILrms, math_ILrms * math_n, math_fs, math_ψ);
                    resonantCapacitor.AddEvalParameters(i, j, math_ILrms);
                    filteringCapacitor.AddEvalParameters(i, j, math_ICfrms);
                }
                //graph1.Draw();
                //graph2.Draw();
                //graph3.Draw();
                //graph4.Draw();
                //graph5.Draw();
            }

            //若认为谐振电感集成在变压器中,则不考虑额外谐振电感
            //if (this.isLeakageInductanceIntegrated)
            //{
            //    this.deviceInductorNum = 0;
            //}

            //设置元器件的设计条件
            primaryDualModule.SetConditions(math_Vinmax, ILmax, fsmax); //TODO 电流取RMS最大值 or 最大值?
            single.SetConditions(math_Vo, math_n * ILmax, fsmax);
            secondaryDualDiodeModule.SetConditions(math_Vo, math_n * ILmax, fsmax);
            resonantInductor.SetConditions(math_Lr, ILmax, fsmax);
            transformer.SetConditions(math_P, ILmax, ILmax * math_n, fsmax, math_n, 1, ψmax); //FIXME 磁链是否会变化?
            resonantCapacitor.SetConditions(math_Cr, VCrmax, ILrms_max);
            filteringCapacitor.SetConditions(200 * 1e-6, math_Vo, ICfrms_max);
        }