private float CalculateDlTotalLoss(IACell carrier, User user, LinkLossStruct ulLinkLossStruct, bool isLTECell) { if (isLTECell) { LTECell lteCarrier = carrier as LTECell; return CalculateDlTotalLoss(lteCarrier, user, ulLinkLossStruct); } else { RelayCell relayCarrier = carrier as RelayCell; return CalculateDlTotalLoss(relayCarrier, user, ulLinkLossStruct); } }
///// <summary> ///// backhaul链路上下行损耗 未完成 ///// </summary> ///// <param name="cell"></param> ///// <param name="user"></param> ///// <returns></returns> //private LinkLossStruct[] GetBackhaulUlAndDlLinkLoss(Transceiver cell, User relayUser) //{ // LinkLossStruct[] structArray = new LinkLossStruct[2]; // this.m_StructAntennaParam.MsX = relayUser.X; // this.m_StructAntennaParam.MsY = relayUser.Y; // this.m_StructAntennaParam.MsHeight = this.m_GeoInfo.GetValueByGeoXYPoint(relayUser.X, relayUser.Y, DemDataType.Height); // float[][] numArray = this.m_iplCalDataVstr.GetPointBackhaulPathLoss(cell, relayUser.X, relayUser.Y); // float penetrationLoss = 0f; // if ((user.Clutter != null) && user.IsIndoor) // { // short buildHeight = 0; // buildHeight = this.m_GeoInfo.GetValueByGeoXYPoint(user.X, user.Y, DemDataType.Building); // penetrationLoss = (float)this.GetPenetrationLoss(user.Clutter.Id, buildHeight); // } // //int key = tranceiver.ID; // //float loss = 0f; // //if (!m_TranceiverClutterloss.TryGetValue(key, out loss)) // //{ // // ClutterParamsResult clutterParam = ConfingClutter(tranceiver); // // loss += GetShadowloss(clutterParam.ShadowStd, isShadow, coverageProb); // // loss += GetIndoorloss(isIndoorCov, clutterParam); // // m_TranceiverClutterloss.Add(key, loss); // //} // //return loss; // ////relay一侧设备损耗 // //relayUser.Terminal.Reception; // //BtsEquipment btsEquipment = relayCell.ParentRN.Equipment; // //List<AntConfig> antConfigs = new List<AntConfig>(); // //antConfigs.Add(relayCell.CellToUEAnt); // double noiseFigureOfBts = 0;// Transceiver.CalculateNoiseFigureOfBts(antConfigs, (double)btsEquipment.NoiseFigure); // float num7 = (float)noiseFigureOfBts + penetrationLoss; // structArray[0].pathLoss = numArray[0][0]; // structArray[0].otherTotalLoss = num7; // structArray[1].pathLoss = numArray[0][1]; // structArray[1].otherTotalLoss = num7 + this.m_StructAntennaParam.AntConfigSetUp.DlTotalLoss; // return structArray; //} /// <summary> /// access链路上下行损耗 /// </summary> /// <param name="cell"></param> /// <param name="user"></param> /// <returns></returns> private LinkLossStruct[] GetAccessUlAndDlLinkLoss(RelayCell cell, User user) { LinkLossStruct[] structArray = new LinkLossStruct[2]; this.m_StructAntennaParam.MsX = user.X; this.m_StructAntennaParam.MsY = user.Y; this.m_StructAntennaParam.MsHeight = this.m_GeoInfo.GetValueByGeoXYPoint(user.X, user.Y, DemDataType.Height); float[][] numArray = m_iGetRelayUEPathLoss.GetRelayUEPointPathLoss(cell, user.X, user.Y); float penetrationLoss = 0f; if ((user.Clutter != null) && user.IsIndoor) { short buildHeight = 0; buildHeight = this.m_GeoInfo.GetValueByGeoXYPoint(user.X, user.Y, DemDataType.Building); penetrationLoss = (float)this.GetPenetrationLoss(user.Clutter.Id, buildHeight); } float bodyLoss = (user.Service as UnionPsService).BodyLoss; float loss = user.Terminal.NetTerminalList[0].Loss; float attenuation = user.Terminal.Attenuation; float gain = user.Terminal.Gain; float num7 = (((bodyLoss + loss) + attenuation) - user.Terminal.Gain) + penetrationLoss; structArray[0].pathLoss = numArray[0][0]; structArray[0].otherTotalLoss = num7; structArray[1].pathLoss = numArray[0][1]; structArray[1].otherTotalLoss = num7 + this.m_StructAntennaParam.AntConfigSetUp.DlTotalLoss; return structArray; }
/// <summary> /// backhaul链路上下行损耗 未完成 /// </summary> /// <param name="cell"></param> /// <param name="user"></param> /// <returns></returns> private LinkLossStruct[] GetBackhaulUlAndDlLinkLoss(Transceiver cell, RelayCell relayCell) { LinkLossStruct[] structArray = new LinkLossStruct[2]; this.m_StructAntennaParam.MsX = relayCell.ParentRN.X; this.m_StructAntennaParam.MsY = relayCell.ParentRN.Y; this.m_StructAntennaParam.MsHeight = this.m_GeoInfo.GetValueByGeoXYPoint(relayCell.ParentRN.X, relayCell.ParentRN.Y, DemDataType.Height); float[][] numArray = this.m_iplCalDataVstr.GetPointBackhaulPathLoss(cell, relayCell.ParentRN.X, relayCell.ParentRN.Y); float penetrationLoss = 0f; //todo 判断Relay是否是室内,是的话加穿透损耗 //if ((user.Clutter != null) && user.IsIndoor) //{ // short buildHeight = 0; // buildHeight = this.m_GeoInfo.GetValueByGeoXYPoint(user.X, user.Y, DemDataType.Building); // penetrationLoss = (float)this.GetPenetrationLoss(user.Clutter.Id, buildHeight); //} //int key = tranceiver.ID; //float loss = 0f; //if (!m_TranceiverClutterloss.TryGetValue(key, out loss)) //{ // ClutterParamsResult clutterParam = ConfingClutter(tranceiver); // loss += GetShadowloss(clutterParam.ShadowStd, isShadow, coverageProb); // loss += GetIndoorloss(isIndoorCov, clutterParam); // m_TranceiverClutterloss.Add(key, loss); //} //return loss; //relay一侧设备损耗 BtsEquipment btsEquipment = relayCell.ParentRN.Equipment; List<AntConfig> antConfigs = new List<AntConfig>(); antConfigs.Add(relayCell.CellToUEAnt); double noiseFigureOfBts = Transceiver.CalculateNoiseFigureOfBts(antConfigs, (double)btsEquipment.NoiseFigure); float num7 = (float)noiseFigureOfBts + penetrationLoss; //backhaul的路损计算减去一个15dB的偏置值 num7 -= 15; structArray[0].pathLoss = numArray[0][0]; structArray[0].otherTotalLoss = num7; structArray[1].pathLoss = numArray[0][1]; structArray[1].otherTotalLoss = num7 + this.m_StructAntennaParam.AntConfigSetUp.DlTotalLoss; return structArray; }
private LinkLossStruct[] GetMultUlAndDlLinkLoss(Transceiver cell, User user) { LinkLossStruct[] structArray = new LinkLossStruct[2]; LinkLossStruct[] structArray2 = new LinkLossStruct[2]; LinkLossStruct[] structArray3 = new LinkLossStruct[2]; this.m_StructAntennaParam.MsX = user.X; this.m_StructAntennaParam.MsY = user.Y; this.m_StructAntennaParam.MsHeight = this.m_GeoInfo.GetValueByGeoXYPoint(user.X, user.Y, DemDataType.Height); float penetrationLoss = 0f; if ((user.Clutter != null) && user.IsIndoor) { short buildHeight = 0; buildHeight = this.m_GeoInfo.GetValueByGeoXYPoint(user.X, user.Y, DemDataType.Building); penetrationLoss = (float) this.GetPenetrationLoss(user.Clutter.Id, buildHeight); } for (int i = 0; i < cell.AntConfiguration.Count; i++) { AntConfig config = cell.AntConfiguration[i]; float[][] numArray = this.m_iplCalDataVstr.GetPointPathLoss(cell, config.AntennaID, user.X, user.Y); this.m_StructAntennaParam.AntConfigSetUp = config; float bodyLoss = (user.Service as UnionPsService).BodyLoss; float loss = user.Terminal.NetTerminalList[0].Loss; float attenuation = user.Terminal.Attenuation; float gain = user.Terminal.Gain; float num8 = (((bodyLoss + loss) + attenuation) - user.Terminal.Gain) + penetrationLoss; structArray[0].pathLoss = numArray[0][0]; structArray[0].otherTotalLoss = num8; structArray[1].pathLoss = numArray[0][1]; structArray[1].otherTotalLoss = num8 + this.m_StructAntennaParam.AntConfigSetUp.DlTotalLoss; structArray2[0].pathLoss += 1f / ((float) UnitTrans.dBto((double) (structArray[0].pathLoss + structArray[0].otherTotalLoss))); structArray2[1].pathLoss += cell.AntConfiguration[i].TxPowerRatio / ((float) UnitTrans.dBto((double) (structArray[1].pathLoss + structArray[1].otherTotalLoss))); } structArray3[0].pathLoss = -1f * ((float) UnitTrans.todB((double) structArray2[0].pathLoss)); structArray3[0].otherTotalLoss = 0f; structArray3[1].pathLoss = -1f * ((float) UnitTrans.todB((double) structArray2[1].pathLoss)); structArray3[1].otherTotalLoss = 0f; return structArray3; }
/// <summary> /// access路损 /// </summary> /// <param name="carrier"></param> /// <param name="userList"></param> /// <returns></returns> public LinkLossStruct[][][] GetAccessLinkLoss(RelayCell carrier, List<User> userList) { LinkLossStruct[] ulAndDlLinkLoss; int num; LinkLossStruct[][][] structArray = new LinkLossStruct[userList.Count][][]; Transceiver parent = carrier.Parent; this.m_StructAntennaParam.IsSimple = false; isRelayOutdoorAntenna(carrier); for (num = 0; num < userList.Count; num++) { structArray[num] = new LinkLossStruct[][] { new LinkLossStruct[2] }; ulAndDlLinkLoss = GetAccessUlAndDlLinkLoss(carrier, userList[num]); structArray[num][0][0] = ulAndDlLinkLoss[0]; structArray[num][0][1] = ulAndDlLinkLoss[1]; } return structArray; }
/// <summary> /// backhaul路损 仿真 /// </summary> /// <param name="carrier"></param> /// <param name="userList"></param> /// <returns></returns> public LinkLossStruct[][][] GetBackhaulLinkLoss(LTECell carrier, List<RelayCell> rcList) { LinkLossStruct[] ulAndDlLinkLoss; int num; LinkLossStruct[][][] structArray = new LinkLossStruct[rcList.Count][][]; Transceiver parent = carrier.Parent; this.m_StructAntennaParam.IsSimple = false; //if (parent.AntConfiguration.Count == 1) //{ this.isOutdoorAntenna(parent); for (num = 0; num < rcList.Count; num++) { structArray[num] = new LinkLossStruct[][] { new LinkLossStruct[2] }; ulAndDlLinkLoss = GetBackhaulUlAndDlLinkLoss(parent, rcList[num]); structArray[num][0][0] = ulAndDlLinkLoss[0]; structArray[num][0][1] = ulAndDlLinkLoss[1]; } return structArray; //} //for (num = 0; num < rcList.Count; num++) //{ // structArray[num] = new LinkLossStruct[][] { new LinkLossStruct[2] }; // ulAndDlLinkLoss = this.GetMultUlAndDlLinkLoss(parent, rcList[num]); // structArray[num][0][0] = ulAndDlLinkLoss[0]; // structArray[num][0][1] = ulAndDlLinkLoss[1]; //} //return structArray; }
public LinkLossStruct[][][] GetLinkLoss(LTECell carrier, List<User> userList) { LinkLossStruct[] ulAndDlLinkLoss; int num; LinkLossStruct[][][] structArray = new LinkLossStruct[userList.Count][][]; Transceiver parent = carrier.Parent; this.m_StructAntennaParam.IsSimple = false; if (parent.AntConfiguration.Count == 1) { this.isOutdoorAntenna(parent); for (num = 0; num < userList.Count; num++) { structArray[num] = new LinkLossStruct[][] { new LinkLossStruct[2] }; ulAndDlLinkLoss = this.GetUlAndDlLinkLoss(parent, userList[num]); structArray[num][0][0] = ulAndDlLinkLoss[0]; structArray[num][0][1] = ulAndDlLinkLoss[1]; } return structArray; } for (num = 0; num < userList.Count; num++) { structArray[num] = new LinkLossStruct[][] { new LinkLossStruct[2] }; ulAndDlLinkLoss = this.GetMultUlAndDlLinkLoss(parent, userList[num]); structArray[num][0][0] = ulAndDlLinkLoss[0]; structArray[num][0][1] = ulAndDlLinkLoss[1]; } return structArray; }
private float CalculateDlTotalLoss(LTECell carrier, User user, LinkLossStruct dlLinkLossStruct) { if (dlLinkLossStruct.pathLoss == float.MinValue) { return float.MaxValue; } double num = 0.0; float userClutterModeDiviation = UserManager.getInstance().GetUserClutterModeDiviation(this.m_SubSysInterface, user); dlLinkLossStruct.pathLoss = Math.Max(dlLinkLossStruct.pathLoss, 73.35696f); float num3 = this.CalculateShadowFadeValue(carrier, user, this.m_Coefficientabc, userClutterModeDiviation); num = dlLinkLossStruct.pathLoss + num3; double num4 = Math.Sqrt(((carrier.Parent.X - user.X) * (carrier.Parent.X - user.X)) + ((carrier.Parent.Y - user.Y) * (carrier.Parent.Y - user.Y))); //Commented by wj //×ÔÓɿռ䴫²¥ËðºÄ double num5 = 32.4 + (20.0 * Math.Log10((carrier.FreqBand.DLFrequency * num4) / 1000.0)); num = (num < num5) ? num5 : num; num += dlLinkLossStruct.otherTotalLoss; return (float) num; }
private LinkLossStruct[][][] CalcUserPathLoss(LTECell carrier, List<User> userList, bool isUse3GPP) { LinkLossStruct[][][] structArray = new LinkLossStruct[userList.Count][][]; for (int i = 0; i < userList.Count; i++) { User user = userList[i]; float num2 = this.GetUlPathLoss(carrier, user, isUse3GPP); float num3 = this.globalObj.m_PenatrateLoss + this.CalculateUlEquipmentLoss(carrier, user); float num4 = this.GetDlPathLoss(carrier, user, isUse3GPP); float num5 = this.globalObj.m_PenatrateLoss + this.CalculateDlEquipmentLoss(carrier, user); structArray[i] = new LinkLossStruct[][] { new LinkLossStruct[2] }; structArray[i][0][0].pathLoss = num2; structArray[i][0][0].otherTotalLoss = num3; structArray[i][0][1].pathLoss = num4; structArray[i][0][1].otherTotalLoss = num5; } return structArray; }
private float CalculateUlTotalLoss(RelayCell carrier, User user, LinkLossStruct ulLinkLossStruct) { if (ulLinkLossStruct.pathLoss == float.MinValue) { return float.MaxValue; } double num = 0.0; float userClutterModeDiviation = UserManager.getInstance().GetUserClutterModeDiviation(this.m_SubSysInterface, user); ulLinkLossStruct.pathLoss = Math.Max(ulLinkLossStruct.pathLoss, 73.35696f); num = ulLinkLossStruct.pathLoss + this.CalculateShadowFadeValue(carrier, user, this.m_Coefficientabc, userClutterModeDiviation); double num3 = Math.Sqrt(((carrier.ParentRN.X - user.X) * (carrier.ParentRN.X - user.X)) + ((carrier.ParentRN.Y - user.Y) * (carrier.ParentRN.Y - user.Y))); double num4 = 32.4 + (20.0 * Math.Log10((carrier.FreqBand.ULFrequency * num3) / 1000.0)); num = (num < num4) ? num4 : num; num += ulLinkLossStruct.otherTotalLoss; return (float)num; }