/// <summary> /// 读取配置信息 /// </summary> /// <param name="configs">配置信息</param> /// <param name="index">当前下标</param> public override void Load(string[] configs, ref int index) { EfficiencyEval = double.Parse(configs[index++]); Volume = double.Parse(configs[index++]); Cost = double.Parse(configs[index++]); DCAC_Vinv = double.Parse(configs[index++]); IsolatedDCDC = new IsolatedDCDCConverter() { PhaseNum = 3, Math_Psys = Math_Psys, Math_Vin_min = Math_Vpv_min, Math_Vin_max = Math_Vpv_max, IsInputVoltageVariation = true, Math_Vo = DCAC_Vinv }; IsolatedDCDC.Load(configs, ref index); DCAC = new DCACConverter() { PhaseNum = 3, Math_Psys = Math_Psys, Math_Vin = DCAC_Vinv, Math_Vg = Math_Vg, Math_Vo = Math_Vg / Math.Sqrt(3), Math_fg = Math_fg, Math_Ma_min = DCAC_Ma_min, Math_Ma_max = DCAC_Ma_max, Math_φ = DCAC_φ }; DCAC.Load(configs, ref index); Converters = new Converter[] { IsolatedDCDC, DCAC }; }
/// <summary> /// 初始化 /// </summary> /// <param name="converter">所属变换器</param> public CHB(DCACConverter converter) { //获取设计规格 this.converter = converter; number = converter.Number; modulation = converter.Modulation; math_Pfull = converter.Math_Psys / converter.PhaseNum / number; math_Vin = converter.Math_Vin; math_Votot = converter.Math_Vo; math_fg = converter.Math_fg; math_φ = converter.Math_φ; math_fs = converter.Math_fs; math_Ma = math_Votot * Math.Sqrt(2) / (number * math_Vin); math_Vo = math_Votot / number; math_Iorms = math_Pfull / (math_Vo * Math.Cos(math_φ)); //初始化元器件 semiconductor = new CHBModule(1) { Name = "开关器件", VoltageVariable = false, MultiNumber = number }; GridInductor = new GridInductor(1) { Name = "并网滤波电感", VoltageVariable = false, MultiNumber = number }; ACInductor = new ACInductor(1) { Name = "滤波电感", VoltageVariable = false }; componentGroups = new Component[1][]; if (Configuration.IS_GRID_CONNECTED_INDUCTOR_DESIGNED) { components = new Component[] { semiconductor, GridInductor }; componentGroups[0] = new Component[] { semiconductor, GridInductor }; } else { components = new Component[] { semiconductor, ACInductor }; componentGroups[0] = new Component[] { semiconductor, ACInductor }; } }
/// <summary> /// 根据给定的条件进行优化设计 /// </summary> public override void Optimize(MainForm form, double progressMin, double progressMax) { double progress = progressMin; double dp = (progressMax - progressMin) / Math_VbusRange.Length; foreach (double Vbus in Math_VbusRange) //母线电压变化 { form.PrintDetails(3, "Now DC bus voltage = " + Vbus + ":"); //前级DC/DC变换器设计 form.PrintDetails(3, "-------------------------"); form.PrintDetails(3, "Front-stage DC/DC converters design..."); DCDC = new DCDCConverter() { PhaseNum = 1, Math_Psys = Math_Psys, Math_Vin_min = Math_Vpv_min, Math_Vin_max = Math_Vpv_max, IsInputVoltageVariation = true, Math_Vo = Vbus, NumberRange = DCDC_numberRange, TopologyRange = DCDC_topologyRange, FrequencyRange = DCDC_frequencyRange }; DCDC.Optimize(form, progress, progress + dp * 0.2); progress += dp * 0.2; if (DCDC.AllDesignList.Size <= 0) { progress += dp * 0.8; form.Estimate_Result_ProgressBar_Set(progress); continue; } double dp2 = (dp * 0.8) / Math_VinvRange.Length / IsolatedDCDC_secondaryRange.Length / IsolatedDCDC_numberRange.Length; foreach (double Vinv in Math_VinvRange) //逆变直流侧电压变化 { form.PrintDetails(3, "Now Inv DC voltage = " + Vinv + ":"); form.PrintDetails(3, "-------------------------"); foreach (int No in IsolatedDCDC_secondaryRange) //一拖N { foreach (int n in IsolatedDCDC_numberRange) { //逆变器设计 form.PrintDetails(3, "-------------------------"); form.PrintDetails(3, "Inverters design..."); DCAC = new DCACConverter() { PhaseNum = 3, Math_Psys = Math_Psys, Math_Vin = Vinv, Math_Vg = Math_Vg, Math_Vo = Math_Vg / Math.Sqrt(3), Math_fg = Math_fg, Math_Ma_min = DCAC_Ma_min, Math_Ma_max = DCAC_Ma_max, Math_φ = DCAC_φ, NumberRange = new int[] { n *No }, TopologyRange = DCAC_topologyRange, ModulationRange = DCAC_modulationRange, FrequencyRange = DCAC_frequencyRange }; DCAC.Optimize(form, progress, progress + dp2 * 0.3); progress += dp2 * 0.3; if (DCAC.AllDesignList.Size <= 0) { progress += dp2 * 0.7; continue; } //隔离DC/DC变换器设计 form.PrintDetails(3, "-------------------------"); form.PrintDetails(3, "Isolated DC/DC converters design..."); IsolatedDCDC = new IsolatedDCDCConverter() { PhaseNum = 3, Math_Psys = Math_Psys, Math_Vin = Vbus, IsInputVoltageVariation = false, Math_Vo = Vinv, Math_No_Range = new int[] { No }, NumberRange = new int[] { n }, TopologyRange = IsolatedDCDC_topologyRange, FrequencyRange = IsolatedDCDC_frequencyRange, Math_Q_Range = IsolatedDCDC_Math_Q_Range, Math_k_Range = IsolatedDCDC_Math_k_Range }; IsolatedDCDC.Optimize(form, progress, progress + dp2 * 0.3); progress += dp2 * 0.3; if (IsolatedDCDC.AllDesignList.Size <= 0) { progress += dp2 * 0.4; continue; } //整合得到最终结果 form.PrintDetails(3, "-------------------------"); form.PrintDetails(3, "Iso num=" + n + ", Iso sec=" + No + ", DC bus voltage=" + Vbus + ", Combining..."); ConverterDesignList newDesignList = new ConverterDesignList(); newDesignList.Combine(DCDC.ParetoDesignList); newDesignList.Combine(IsolatedDCDC.ParetoDesignList); newDesignList.Combine(DCAC.ParetoDesignList); newDesignList.Transfer(new string[] { Vbus.ToString(), DCAC.Math_Vin.ToString() }); ParetoDesignList.Merge(newDesignList); //记录Pareto最优设计 AllDesignList.Merge(newDesignList); //记录所有设计 progress += dp2 * 0.4; form.Estimate_Result_ProgressBar_Set(progress); } form.PrintDetails(3, "========================="); } } } }