diff --git a/0PD.mat b/0PD.mat new file mode 100644 index 0000000..e7a6a61 Binary files /dev/null and b/0PD.mat differ diff --git a/0QD.mat b/0QD.mat new file mode 100644 index 0000000..437051f Binary files /dev/null and b/0QD.mat differ diff --git a/0SEVAngel.mat b/0SEVAngel.mat new file mode 100644 index 0000000..943283e Binary files /dev/null and b/0SEVAngel.mat differ diff --git a/0SEVolt.mat b/0SEVolt.mat new file mode 100644 index 0000000..d7ccf04 Binary files /dev/null and b/0SEVolt.mat differ diff --git a/100PD.mat b/100PD.mat new file mode 100644 index 0000000..5a697bc Binary files /dev/null and b/100PD.mat differ diff --git a/100QD.mat b/100QD.mat new file mode 100644 index 0000000..9d2b98c Binary files /dev/null and b/100QD.mat differ diff --git a/100SEVAngel.mat b/100SEVAngel.mat new file mode 100644 index 0000000..956740f Binary files /dev/null and b/100SEVAngel.mat differ diff --git a/100SEVolt.mat b/100SEVolt.mat new file mode 100644 index 0000000..e18e9b2 Binary files /dev/null and b/100SEVolt.mat differ diff --git a/50PD.mat b/50PD.mat new file mode 100644 index 0000000..6d2f168 Binary files /dev/null and b/50PD.mat differ diff --git a/50QD.mat b/50QD.mat new file mode 100644 index 0000000..ad2102e Binary files /dev/null and b/50QD.mat differ diff --git a/50SEVAngel.mat b/50SEVAngel.mat new file mode 100644 index 0000000..56cd91d Binary files /dev/null and b/50SEVAngel.mat differ diff --git a/50SEVolt.mat b/50SEVolt.mat new file mode 100644 index 0000000..4ffa9b9 Binary files /dev/null and b/50SEVolt.mat differ diff --git a/@Opti/Opti.m b/@Opti/Opti.m index 9e36a51..1a4d156 100644 --- a/@Opti/Opti.m +++ b/@Opti/Opti.m @@ -24,6 +24,7 @@ classdef Opti rPD=NaN; rQD=NaN; mLoadCurrent=NaN; + noLoadi=NaN; end methods diff --git a/@Opti/equ.asv b/@Opti/equ.asv index d902550..c6f62e0 100644 --- a/@Opti/equ.asv +++ b/@Opti/equ.asv @@ -1,6 +1,7 @@ function [ output_args,this ] = equ( this,x ) %EQU Summary of this function goes here % Detailed explanation goes here +output_args=[]; PDi=this.PDi; QDi=this.QDi; Volt0=this.Volt0; @@ -23,37 +24,44 @@ busNum=length(Volt0); VMatrix=sparse(r,c,VAngel(r)-VAngel(c)-Angel,busNum,busNum); dP=PG-PD_-diag(Volt)*(Y.*cos(VMatrix))*Volt; dQ=QG-QD_-diag(Volt)*(Y.*spfun(@sin,VMatrix))*Volt; -output_args=[dP;dQ]; +output_args=[dP;dQ];%潮流约束 %% 使用零注入begin % zeroInj=setdiff(1:busNum,union(Balance,union(PDi,QDi))); -% output_args=[output_args(zeroInj);output_args(length(PDi)+zeroInj)]; +% output_args=[output_args(zeroInj);output_args(length(Volt0)+zeroInj)]; %% 使用零注入end - %电压恒定 output_args=[output_args;Volt(Balance)-1]; %相角恒定 output_args=[output_args;VAngel(Balance)]; this.cu=zeros(length(output_args),1); -this.cl=this.cu; +this.cl=zeros(length(output_args),1); %% 开始增加不等式约束-电压\PD\QD %电压不等式约束 output_args=[output_args;Volt]; -this.cu=[this.cu;1.1*ones(length(Volt),1)]; -this.cl=[this.cl;0.9*ones(length(Volt),1)]; +this.cu=[this.cu;1.07*ones(length(Volt),1)];%9节点 +this.cl=[this.cl;0.93*ones(length(Volt),1)];%9节点 +% this.cu=[this.cu;1.00*ones(length(Volt),1)]; +% this.cl=[this.cl;0.90*ones(length(Volt),1)]; %% PD rPD=this.rPD; output_args=[output_args;PD]; -this.cu=[this.cu;1.5*rPD]; -this.cl=[this.cl;0.5*rPD]; +% PDU=[0.124;0.315;0.5;1;1;0.5;0.63;0.4];%原始数据 +% PDU=[0.63;0.4;0.5;1;0.8;1;0.63;0.4];%偏差比较大 +this.cu=[this.cu;1.2*rPD]; +this.cl=[this.cl;0.8*rPD]; +this.cu=[this.cu;PDU]; +this.cl=[this.cl;0*PDU]; %% QD rQD=this.rQD; output_args=[output_args;QD]; -this.cu=[this.cu;1.9*rQD]; -this.cl=[this.cl;0.9*rQD]; +QDU=PDU; +% this.cu=[this.cu;1.2*rQD]; +% this.cl=[this.cl;0.8*rQD]; +this.cu=[this.cu;QDU]; +this.cl=[this.cl;0*QDU]; %% 稠密化 output_args=full(output_args); this.cu=full(this.cu); this.cl=full(this.cl); - end diff --git a/@Opti/equ.m b/@Opti/equ.m index 6ef94c3..d2f1bd0 100644 --- a/@Opti/equ.m +++ b/@Opti/equ.m @@ -1,6 +1,7 @@ function [ output_args,this ] = equ( this,x ) %EQU Summary of this function goes here % Detailed explanation goes here +output_args=[]; PDi=this.PDi; QDi=this.QDi; Volt0=this.Volt0; @@ -23,37 +24,44 @@ busNum=length(Volt0); VMatrix=sparse(r,c,VAngel(r)-VAngel(c)-Angel,busNum,busNum); dP=PG-PD_-diag(Volt)*(Y.*cos(VMatrix))*Volt; dQ=QG-QD_-diag(Volt)*(Y.*spfun(@sin,VMatrix))*Volt; -output_args=[dP;dQ]; +output_args=[dP;dQ];%潮流约束 %% 使用零注入begin % zeroInj=setdiff(1:busNum,union(Balance,union(PDi,QDi))); % output_args=[output_args(zeroInj);output_args(length(Volt0)+zeroInj)]; %% 使用零注入end - %电压恒定 output_args=[output_args;Volt(Balance)-1]; %相角恒定 output_args=[output_args;VAngel(Balance)]; this.cu=zeros(length(output_args),1); -this.cl=this.cu; +this.cl=zeros(length(output_args),1); %% 开始增加不等式约束-电压\PD\QD %电压不等式约束 output_args=[output_args;Volt]; -this.cu=[this.cu;1.07*ones(length(Volt),1)]; -this.cl=[this.cl;0.93*ones(length(Volt),1)]; +% this.cu=[this.cu;1.07*ones(length(Volt),1)];%9节点 +% this.cl=[this.cl;0.93*ones(length(Volt),1)];%9节点 +this.cu=[this.cu;1.00*ones(length(Volt),1)]; +this.cl=[this.cl;0.90*ones(length(Volt),1)]; %% PD rPD=this.rPD; output_args=[output_args;PD]; +% PDU=[0.124;0.315;0.5;1;1;0.5;0.63;0.4];%原始数据 +% PDU=[0.63;0.4;0.5;1;0.8;1;0.63;0.4];%偏差比较大 this.cu=[this.cu;1.2*rPD]; this.cl=[this.cl;0.8*rPD]; +% this.cu=[this.cu;PDU]; +% this.cl=[this.cl;0*PDU]; %% QD rQD=this.rQD; output_args=[output_args;QD]; +% QDU=PDU; this.cu=[this.cu;1.2*rQD]; this.cl=[this.cl;0.8*rQD]; +% this.cu=[this.cu;QDU]; +% this.cl=[this.cl;0*QDU]; %% 稠密化 output_args=full(output_args); this.cu=full(this.cu); this.cl=full(this.cl); - end diff --git a/@Opti/init.m b/@Opti/init.m index 01d996f..f257cc8 100644 --- a/@Opti/init.m +++ b/@Opti/init.m @@ -1,4 +1,4 @@ -function [ this ] = init( this,Volt0,PDi,QDi,wPD,wQD,wVolt,wLoadCurrent,PD0,QD0,rPD,rQD,Y,Angel,r,c,PG,QG,Balance,mLoadCurrent) +function [ this ] = init( this,Volt0,PDi,QDi,wPD,wQD,wVolt,wLoadCurrent,PD0,QD0,rPD,rQD,Y,Angel,r,c,PG,QG,Balance,mLoadCurrent,noLoadi) %INIT Summary of this function goes here % Detailed explanation goes here this.PDi=PDi; @@ -20,5 +20,6 @@ this.rQD=rQD; this.wVolt=wVolt; this.wLoadCurrent=wLoadCurrent; this.mLoadCurrent=mLoadCurrent; +this.noLoadi=noLoadi; end diff --git a/@Opti/obj.m b/@Opti/obj.m index ea00770..3e971e9 100644 --- a/@Opti/obj.m +++ b/@Opti/obj.m @@ -10,19 +10,13 @@ wQD=this.wQD; PD0=this.PD0; QD0=this.QD0; t4=(wPD(PDi).*(PD-PD0(PDi))).^2; -% t4=wPD(PDi).*((PD-PD0(PDi))./PD0(PDi)).^2; t5=(wQD(QDi).*(QD-QD0(QDi))).^2; -% t5=wQD(QDi).*((QD-QD0(QDi))./QD0(QDi)).^2; Volt0=this.Volt0; SEVolt=x(length(PDi)+length(QDi)+1:length(PDi)+length(QDi)+length(Volt0)); wVolt=this.wVolt; -t6=(wVolt.*(SEVolt-Volt0)).^2; -% t6=wVolt.*((SEVolt-Volt0)./Volt0).^2; +t6=(wVolt.*((SEVolt-Volt0))).^2; Balance=this.Balance; t6(Balance)=0;%不计算平衡节点的 -% xx=t6(8); -% t6=xx; -% t6(9:end)=0; % 电流 SEVAngel=x(length(PDi)+length(QDi)+length(SEVolt)+1:end); loadCurrent=LoadCurrent( SEVolt,SEVAngel,PD0(PDi),QD0(QDi),PDi,QDi ); @@ -30,7 +24,7 @@ wLoadCurrent=this.wLoadCurrent; mLoadCurrent=this.mLoadCurrent; % t7=(wLoadCurrent.*(loadCurrent-mLoadCurrent)).^2; t7=wLoadCurrent.*((loadCurrent-mLoadCurrent)./mLoadCurrent).^2; -output_args=sum(t4)+sum(t5)+sum(t6)+sum(0); +output_args=sum(t4)+sum(t5)+sum(t6); output_args=full(output_args); end diff --git a/DrawloadCurves.asv b/DrawloadCurves.asv new file mode 100644 index 0000000..16821e9 --- /dev/null +++ b/DrawloadCurves.asv @@ -0,0 +1,9 @@ +retail=dlmread('E:\书籍\论文\配电网状态估计\零售业负荷.txt'); +retail=retail/max(retail); +tobacco=dlmread('E:\书籍\论文\配电网状态估计\烟草负荷.txt'); +tobacco=tobacco/max(retail); +residential=dlmread('E:\书籍\论文\配电网状态估计\城镇居民负荷.txt'); +residential=residential/max(retail); +x=1:length(retail); +subplot(2,2,1); +plot(x,retai \ No newline at end of file diff --git a/DrawloadCurves.m b/DrawloadCurves.m new file mode 100644 index 0000000..27dec01 --- /dev/null +++ b/DrawloadCurves.m @@ -0,0 +1,38 @@ +clear +clc +retail=dlmread('E:\书籍\论文\配电网状态估计\零售业负荷.txt'); +retail=retail/1000; +retail(length(retail)+1)=retail(end)*0.98; +tobacco=dlmread('E:\书籍\论文\配电网状态估计\烟草负荷.txt'); +tobacco=tobacco/1; +tobacco(length(tobacco)+1)=tobacco(end)*1.02; +residential=dlmread('E:\书籍\论文\配电网状态估计\城镇居民负荷.txt'); +residential=residential/10000; +residential(length(residential)+1)=residential(end)*0.98; +figure('Color',[1 1 1]); +x=0:length(retail)-1; +subplot(2,2,1); +plot(x/4,residential); +xlim([0 24]); +% ylim([0 1.05]); +set(gca,'xtick', x) +xlabel('时刻/时'); +ylabel('kW'); +title('居民负荷'); +% set(gca,'ytick',[]); +subplot(2,2,2); +plot(x/4,tobacco); +xlim([0 24]); +% ylim([0 1.05]); +set(gca,'xtick', x) +xlabel('时刻/时'); +ylabel('kW'); +title('工业负荷'); +subplot(2,2,3); +plot(x/4,retail); +xlim([0 24]); +% ylim([0 1.05]); +set(gca,'xtick', x) +xlabel('时刻/时'); +ylabel('kW'); +title('商业负荷'); \ No newline at end of file diff --git a/Filter/Filtering.mdl b/Filter/Filtering.mdl new file mode 100644 index 0000000..34687e2 --- /dev/null +++ b/Filter/Filtering.mdl @@ -0,0 +1,705 @@ +Model { + Name "Filtering" + Version 7.5 + MdlSubVersion 0 + GraphicalInterface { + NumRootInports 0 + NumRootOutports 0 + ParameterArgumentNames "" + ComputedModelVersion "1.6" + NumModelReferences 0 + NumTestPointedSignals 0 + } + SavedCharacterEncoding "GBK" + SaveDefaultBlockParams on + ScopeRefreshTime 0.035000 + OverrideScopeRefreshTime on + DisableAllScopes off + DataTypeOverride "UseLocalSettings" + MinMaxOverflowLogging "UseLocalSettings" + MinMaxOverflowArchiveMode "Overwrite" + MaxMDLFileLineLength 120 + Created "Thu Oct 17 10:08:19 2013" + Creator "dmy" + UpdateHistory "UpdateHistoryNever" + ModifiedByFormat "%" + LastModifiedBy "dmy" + ModifiedDateFormat "%" + LastModifiedDate "Sat Oct 19 16:47:19 2013" + RTWModifiedTimeStamp 304102038 + ModelVersionFormat "1.%" + ConfigurationManager "None" + SampleTimeColors off + SampleTimeAnnotations off + LibraryLinkDisplay "none" + WideLines off + ShowLineDimensions off + ShowPortDataTypes off + ShowLoopsOnError on + IgnoreBidirectionalLines off + ShowStorageClass off + ShowTestPointIcons on + ShowSignalResolutionIcons on + ShowViewerIcons on + SortedOrder off + ExecutionContextIcon off + ShowLinearizationAnnotations on + BlockNameDataTip off + BlockParametersDataTip off + BlockDescriptionStringDataTip off + ToolBar on + StatusBar on + BrowserShowLibraryLinks off + BrowserLookUnderMasks off + SimulationMode "normal" + LinearizationMsg "none" + Profile off + ParamWorkspaceSource "MATLABWorkspace" + AccelSystemTargetFile "accel.tlc" + AccelTemplateMakefile "accel_default_tmf" + AccelMakeCommand "make_rtw" + TryForcingSFcnDF off + RecordCoverage off + CovPath "/" + CovSaveName "covdata" + CovMetricSettings "dw" + CovNameIncrementing off + CovHtmlReporting on + CovForceBlockReductionOff on + covSaveCumulativeToWorkspaceVar on + CovSaveSingleToWorkspaceVar on + CovCumulativeVarName "covCumulativeData" + CovCumulativeReport off + CovReportOnPause on + CovModelRefEnable "Off" + CovExternalEMLEnable off + ExtModeBatchMode off + ExtModeEnableFloating on + ExtModeTrigType "manual" + ExtModeTrigMode "normal" + ExtModeTrigPort "1" + ExtModeTrigElement "any" + ExtModeTrigDuration 1000 + ExtModeTrigDurationFloating "auto" + ExtModeTrigHoldOff 0 + ExtModeTrigDelay 0 + ExtModeTrigDirection "rising" + ExtModeTrigLevel 0 + ExtModeArchiveMode "off" + ExtModeAutoIncOneShot off + ExtModeIncDirWhenArm off + ExtModeAddSuffixToVar off + ExtModeWriteAllDataToWs off + ExtModeArmWhenConnect on + ExtModeSkipDownloadWhenConnect off + ExtModeLogAll on + ExtModeAutoUpdateStatusClock on + BufferReuse on + ShowModelReferenceBlockVersion off + ShowModelReferenceBlockIO off + Array { + Type "Handle" + Dimension 1 + Simulink.ConfigSet { + $ObjectID 1 + Version "1.10.0" + Array { + Type "Handle" + Dimension 9 + Simulink.SolverCC { + $ObjectID 2 + Version "1.10.0" + StartTime "0.0" + StopTime "96" + AbsTol "auto" + FixedStep "auto" + InitialStep "auto" + MaxNumMinSteps "-1" + MaxOrder 5 + ZcThreshold "auto" + ConsecutiveZCsStepRelTol "10*128*eps" + MaxConsecutiveZCs "1000" + ExtrapolationOrder 4 + NumberNewtonIterations 1 + MaxStep "auto" + MinStep "auto" + MaxConsecutiveMinStep "1" + RelTol "1e-3" + SolverMode "Auto" + Solver "ode45" + SolverName "ode45" + SolverJacobianMethodControl "auto" + ShapePreserveControl "DisableAll" + ZeroCrossControl "UseLocalSettings" + ZeroCrossAlgorithm "Nonadaptive" + AlgebraicLoopSolver "TrustRegion" + SolverResetMethod "Fast" + PositivePriorityOrder off + AutoInsertRateTranBlk off + SampleTimeConstraint "Unconstrained" + InsertRTBMode "Whenever possible" + } + Simulink.DataIOCC { + $ObjectID 3 + Version "1.10.0" + Decimation "1" + ExternalInput "[t, u]" + FinalStateName "xFinal" + InitialState "xInitial" + LimitDataPoints on + MaxDataPoints "1000" + LoadExternalInput off + LoadInitialState off + SaveFinalState off + SaveCompleteFinalSimState off + SaveFormat "Array" + SaveOutput on + SaveState off + SignalLogging on + DSMLogging on + InspectSignalLogs off + SaveTime on + ReturnWorkspaceOutputs off + StateSaveName "xout" + TimeSaveName "tout" + OutputSaveName "yout" + SignalLoggingName "logsout" + DSMLoggingName "dsmout" + OutputOption "RefineOutputTimes" + OutputTimes "[]" + ReturnWorkspaceOutputsName "out" + Refine "1" + } + Simulink.OptimizationCC { + $ObjectID 4 + Version "1.10.0" + Array { + Type "Cell" + Dimension 7 + Cell "BooleansAsBitfields" + Cell "PassReuseOutputArgsAs" + Cell "PassReuseOutputArgsThreshold" + Cell "ZeroExternalMemoryAtStartup" + Cell "ZeroInternalMemoryAtStartup" + Cell "OptimizeModelRefInitCode" + Cell "NoFixptDivByZeroProtection" + PropName "DisabledProps" + } + BlockReduction on + BooleanDataType on + ConditionallyExecuteInputs on + InlineParams off + UseIntDivNetSlope off + InlineInvariantSignals off + OptimizeBlockIOStorage on + BufferReuse on + EnhancedBackFolding off + StrengthReduction off + EnforceIntegerDowncast on + ExpressionFolding on + BooleansAsBitfields off + BitfieldContainerType "uint_T" + EnableMemcpy on + MemcpyThreshold 64 + PassReuseOutputArgsAs "Structure reference" + ExpressionDepthLimit 2147483647 + FoldNonRolledExpr on + LocalBlockOutputs on + RollThreshold 5 + SystemCodeInlineAuto off + StateBitsets off + DataBitsets off + UseTempVars off + ZeroExternalMemoryAtStartup on + ZeroInternalMemoryAtStartup on + InitFltsAndDblsToZero off + NoFixptDivByZeroProtection off + EfficientFloat2IntCast off + EfficientMapNaN2IntZero on + OptimizeModelRefInitCode off + LifeSpan "inf" + MaxStackSize "Inherit from target" + BufferReusableBoundary on + SimCompilerOptimization "Off" + AccelVerboseBuild off + } + Simulink.DebuggingCC { + $ObjectID 5 + Version "1.10.0" + RTPrefix "error" + ConsistencyChecking "none" + ArrayBoundsChecking "none" + SignalInfNanChecking "none" + SignalRangeChecking "none" + ReadBeforeWriteMsg "UseLocalSettings" + WriteAfterWriteMsg "UseLocalSettings" + WriteAfterReadMsg "UseLocalSettings" + AlgebraicLoopMsg "warning" + ArtificialAlgebraicLoopMsg "warning" + SaveWithDisabledLinksMsg "warning" + SaveWithParameterizedLinksMsg "warning" + CheckSSInitialOutputMsg on + UnderspecifiedInitializationDetection "Classic" + MergeDetectMultiDrivingBlocksExec "none" + CheckExecutionContextPreStartOutputMsg off + CheckExecutionContextRuntimeOutputMsg off + SignalResolutionControl "UseLocalSettings" + BlockPriorityViolationMsg "warning" + MinStepSizeMsg "warning" + TimeAdjustmentMsg "none" + MaxConsecutiveZCsMsg "error" + SolverPrmCheckMsg "warning" + InheritedTsInSrcMsg "warning" + DiscreteInheritContinuousMsg "warning" + MultiTaskDSMMsg "error" + MultiTaskCondExecSysMsg "error" + MultiTaskRateTransMsg "error" + SingleTaskRateTransMsg "none" + TasksWithSamePriorityMsg "warning" + SigSpecEnsureSampleTimeMsg "warning" + CheckMatrixSingularityMsg "none" + IntegerOverflowMsg "warning" + Int32ToFloatConvMsg "warning" + ParameterDowncastMsg "error" + ParameterOverflowMsg "error" + ParameterUnderflowMsg "none" + ParameterPrecisionLossMsg "warning" + ParameterTunabilityLossMsg "warning" + FixptConstUnderflowMsg "none" + FixptConstOverflowMsg "none" + FixptConstPrecisionLossMsg "none" + UnderSpecifiedDataTypeMsg "none" + UnnecessaryDatatypeConvMsg "none" + VectorMatrixConversionMsg "none" + InvalidFcnCallConnMsg "error" + FcnCallInpInsideContextMsg "Use local settings" + SignalLabelMismatchMsg "none" + UnconnectedInputMsg "warning" + UnconnectedOutputMsg "warning" + UnconnectedLineMsg "warning" + SFcnCompatibilityMsg "none" + UniqueDataStoreMsg "none" + BusObjectLabelMismatch "warning" + RootOutportRequireBusObject "warning" + AssertControl "UseLocalSettings" + EnableOverflowDetection off + ModelReferenceIOMsg "none" + ModelReferenceVersionMismatchMessage "none" + ModelReferenceIOMismatchMessage "none" + ModelReferenceCSMismatchMessage "none" + UnknownTsInhSupMsg "warning" + ModelReferenceDataLoggingMessage "warning" + ModelReferenceSymbolNameMessage "warning" + ModelReferenceExtraNoncontSigs "error" + StateNameClashWarn "warning" + SimStateInterfaceChecksumMismatchMsg "warning" + StrictBusMsg "ErrorLevel1" + BusNameAdapt "WarnAndRepair" + NonBusSignalsTreatedAsBus "none" + LoggingUnavailableSignals "error" + BlockIODiagnostic "none" + } + Simulink.HardwareCC { + $ObjectID 6 + Version "1.10.0" + ProdBitPerChar 8 + ProdBitPerShort 16 + ProdBitPerInt 32 + ProdBitPerLong 32 + ProdIntDivRoundTo "Undefined" + ProdEndianess "Unspecified" + ProdWordSize 32 + ProdShiftRightIntArith on + ProdHWDeviceType "32-bit Generic" + TargetBitPerChar 8 + TargetBitPerShort 16 + TargetBitPerInt 32 + TargetBitPerLong 32 + TargetShiftRightIntArith on + TargetIntDivRoundTo "Undefined" + TargetEndianess "Unspecified" + TargetWordSize 32 + TargetTypeEmulationWarnSuppressLevel 0 + TargetPreprocMaxBitsSint 32 + TargetPreprocMaxBitsUint 32 + TargetHWDeviceType "Specified" + TargetUnknown off + ProdEqTarget on + } + Simulink.ModelReferenceCC { + $ObjectID 7 + Version "1.10.0" + UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" + CheckModelReferenceTargetMessage "error" + EnableParallelModelReferenceBuilds off + ParallelModelReferenceMATLABWorkerInit "None" + ModelReferenceNumInstancesAllowed "Multi" + PropagateVarSize "Infer from blocks in model" + ModelReferencePassRootInputsByReference on + ModelReferenceMinAlgLoopOccurrences off + PropagateSignalLabelsOutOfModel off + SupportModelReferenceSimTargetCustomCode off + } + Simulink.SFSimCC { + $ObjectID 8 + Version "1.10.0" + SFSimEnableDebug on + SFSimOverflowDetection on + SFSimEcho on + SimBlas on + SimCtrlC on + SimExtrinsic on + SimIntegrity on + SimUseLocalCustomCode off + SimBuildMode "sf_incremental_build" + } + Simulink.RTWCC { + $BackupClass "Simulink.RTWCC" + $ObjectID 9 + Version "1.10.0" + Array { + Type "Cell" + Dimension 6 + Cell "IncludeHyperlinkInReport" + Cell "GenerateTraceInfo" + Cell "GenerateTraceReport" + Cell "GenerateTraceReportSl" + Cell "GenerateTraceReportSf" + Cell "GenerateTraceReportEml" + PropName "DisabledProps" + } + SystemTargetFile "grt.tlc" + GenCodeOnly off + MakeCommand "make_rtw" + GenerateMakefile on + TemplateMakefile "grt_default_tmf" + GenerateReport off + SaveLog off + RTWVerbose on + RetainRTWFile off + ProfileTLC off + TLCDebug off + TLCCoverage off + TLCAssert off + ProcessScriptMode "Default" + ConfigurationMode "Optimized" + ConfigAtBuild off + RTWUseLocalCustomCode off + RTWUseSimCustomCode off + IncludeHyperlinkInReport off + LaunchReport off + TargetLang "C" + IncludeBusHierarchyInRTWFileBlockHierarchyMap off + IncludeERTFirstTime off + GenerateTraceInfo off + GenerateTraceReport off + GenerateTraceReportSl off + GenerateTraceReportSf off + GenerateTraceReportEml off + GenerateCodeInfo off + RTWCompilerOptimization "Off" + CheckMdlBeforeBuild "Off" + CustomRebuildMode "OnUpdate" + Array { + Type "Handle" + Dimension 2 + Simulink.CodeAppCC { + $ObjectID 10 + Version "1.10.0" + Array { + Type "Cell" + Dimension 19 + Cell "IgnoreCustomStorageClasses" + Cell "IgnoreTestpoints" + Cell "InsertBlockDesc" + Cell "SFDataObjDesc" + Cell "SimulinkDataObjDesc" + Cell "DefineNamingRule" + Cell "SignalNamingRule" + Cell "ParamNamingRule" + Cell "InlinedPrmAccess" + Cell "CustomSymbolStr" + Cell "CustomSymbolStrGlobalVar" + Cell "CustomSymbolStrType" + Cell "CustomSymbolStrField" + Cell "CustomSymbolStrFcn" + Cell "CustomSymbolStrFcnArg" + Cell "CustomSymbolStrBlkIO" + Cell "CustomSymbolStrTmpVar" + Cell "CustomSymbolStrMacro" + Cell "ReqsInCode" + PropName "DisabledProps" + } + ForceParamTrailComments off + GenerateComments on + IgnoreCustomStorageClasses on + IgnoreTestpoints off + IncHierarchyInIds off + MaxIdLength 31 + PreserveName off + PreserveNameWithParent off + ShowEliminatedStatement off + IncAutoGenComments off + SimulinkDataObjDesc off + SFDataObjDesc off + IncDataTypeInIds off + MangleLength 1 + CustomSymbolStrGlobalVar "$R$N$M" + CustomSymbolStrType "$N$R$M" + CustomSymbolStrField "$N$M" + CustomSymbolStrFcn "$R$N$M$F" + CustomSymbolStrFcnArg "rt$I$N$M" + CustomSymbolStrBlkIO "rtb_$N$M" + CustomSymbolStrTmpVar "$N$M" + CustomSymbolStrMacro "$R$N$M" + DefineNamingRule "None" + ParamNamingRule "None" + SignalNamingRule "None" + InsertBlockDesc off + SimulinkBlockComments on + EnableCustomComments off + InlinedPrmAccess "Literals" + ReqsInCode off + UseSimReservedNames off + } + Simulink.GRTTargetCC { + $BackupClass "Simulink.TargetCC" + $ObjectID 11 + Version "1.10.0" + Array { + Type "Cell" + Dimension 17 + Cell "GeneratePreprocessorConditionals" + Cell "IncludeMdlTerminateFcn" + Cell "CombineOutputUpdateFcns" + Cell "SuppressErrorStatus" + Cell "ERTCustomFileBanners" + Cell "GenerateSampleERTMain" + Cell "GenerateTestInterfaces" + Cell "ModelStepFunctionPrototypeControlCompliant" + Cell "CPPClassGenCompliant" + Cell "MultiInstanceERTCode" + Cell "PurelyIntegerCode" + Cell "SupportNonFinite" + Cell "SupportComplex" + Cell "SupportAbsoluteTime" + Cell "SupportContinuousTime" + Cell "SupportNonInlinedSFcns" + Cell "PortableWordSizes" + PropName "DisabledProps" + } + TargetFcnLib "ansi_tfl_table_tmw.mat" + TargetLibSuffix "" + TargetPreCompLibLocation "" + TargetFunctionLibrary "ANSI_C" + UtilityFuncGeneration "Auto" + ERTMultiwordTypeDef "System defined" + ERTCodeCoverageTool "None" + ERTMultiwordLength 256 + MultiwordLength 2048 + GenerateFullHeader on + GenerateSampleERTMain off + GenerateTestInterfaces off + IsPILTarget off + ModelReferenceCompliant on + ParMdlRefBuildCompliant on + CompOptLevelCompliant on + IncludeMdlTerminateFcn on + GeneratePreprocessorConditionals "Disable all" + CombineOutputUpdateFcns off + SuppressErrorStatus off + ERTFirstTimeCompliant off + IncludeFileDelimiter "Auto" + ERTCustomFileBanners off + SupportAbsoluteTime on + LogVarNameModifier "rt_" + MatFileLogging on + MultiInstanceERTCode off + SupportNonFinite on + SupportComplex on + PurelyIntegerCode off + SupportContinuousTime on + SupportNonInlinedSFcns on + SupportVariableSizeSignals off + EnableShiftOperators on + ParenthesesLevel "Nominal" + PortableWordSizes off + ModelStepFunctionPrototypeControlCompliant off + CPPClassGenCompliant off + AutosarCompliant off + UseMalloc off + ExtMode off + ExtModeStaticAlloc off + ExtModeTesting off + ExtModeStaticAllocSize 1000000 + ExtModeTransport 0 + ExtModeMexFile "ext_comm" + ExtModeIntrfLevel "Level1" + RTWCAPISignals off + RTWCAPIParams off + RTWCAPIStates off + GenerateASAP2 off + } + PropName "Components" + } + } + hdlcoderui.hdlcc { + $ObjectID 12 + Version "1.10.0" + Description "HDL Coder custom configuration component" + Name "HDL Coder" + Array { + Type "Cell" + Dimension 1 + Cell "" + PropName "HDLConfigFile" + } + HDLCActiveTab "0" + } + PropName "Components" + } + Name "Configuration" + CurrentDlgPage "Solver" + ConfigPrmDlgPosition " [ 520, 225, 1400, 855 ] " + } + PropName "ConfigurationSets" + } + Simulink.ConfigSet { + $PropName "ActiveConfigurationSet" + $ObjectID 1 + } + BlockDefaults { + ForegroundColor "black" + BackgroundColor "white" + DropShadow off + NamePlacement "normal" + FontName "Helvetica" + FontSize 10 + FontWeight "normal" + FontAngle "normal" + ShowName on + BlockRotation 0 + BlockMirror off + } + AnnotationDefaults { + HorizontalAlignment "center" + VerticalAlignment "middle" + ForegroundColor "black" + BackgroundColor "white" + DropShadow off + FontName "Helvetica" + FontSize 10 + FontWeight "normal" + FontAngle "normal" + UseDisplayTextAsClickCallback off + } + LineDefaults { + FontName "Helvetica" + FontSize 9 + FontWeight "normal" + FontAngle "normal" + } + BlockParameterDefaults { + Block { + BlockType Clock + DisplayTime off + } + Block { + BlockType Fcn + Expr "sin(u[1])" + SampleTime "-1" + } + Block { + BlockType Scope + ModelBased off + TickLabels "OneTimeTick" + ZoomMode "on" + Grid "on" + TimeRange "auto" + YMin "-5" + YMax "5" + SaveToWorkspace off + SaveName "ScopeData" + LimitDataPoints on + MaxDataPoints "5000" + Decimation "1" + SampleInput off + SampleTime "-1" + } + } + System { + Name "Filtering" + Location [610, 390, 1194, 889] + Open on + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + ReportName "simulink-default.rpt" + SIDHighWatermark 11 + Block { + BlockType Clock + Name "Clock" + SID 7 + Position [85, 245, 105, 265] + DisplayTime on + Decimation "10" + } + Block { + BlockType Fcn + Name "Fcn" + SID 8 + Position [175, 125, 235, 155] + Expr "-4568*x(1)^9+1049*x(1)^8+3.027e4*x(1)^7-9207*x(1)^6-6.556e4*x(1)^5+2.979e4*x(1)^4+4.438e4*x(1)^3-4." + "276e4*x(1)^2+7355*x(1)+4.344e4" + } + Block { + BlockType Scope + Name "Scope" + SID 6 + Ports [2] + Position [400, 131, 430, 164] + Floating off + Location [153, 268, 1586, 860] + Open off + NumInputPorts "2" + List { + ListType AxesTitles + axes1 "%" + axes2 "%" + } + YMin "-5~-5" + YMax "5~5" + DataFormat "StructureWithTime" + SampleTime "0" + } + Line { + SrcBlock "Fcn" + SrcPort 1 + DstBlock "Scope" + DstPort 1 + } + Line { + SrcBlock "Clock" + SrcPort 1 + Points [0, -25; 35, 0; 0, -20] + Branch { + Points [0, -70] + DstBlock "Fcn" + DstPort 1 + } + Branch { + Points [200, 0; 0, -55] + DstBlock "Scope" + DstPort 2 + } + } + } +} diff --git a/Filter/Filtering.mdl.autosave b/Filter/Filtering.mdl.autosave new file mode 100644 index 0000000..2009d49 --- /dev/null +++ b/Filter/Filtering.mdl.autosave @@ -0,0 +1,704 @@ +Model { + Name "Filtering" + Version 7.5 + MdlSubVersion 0 + GraphicalInterface { + NumRootInports 0 + NumRootOutports 0 + ParameterArgumentNames "" + ComputedModelVersion "1.6" + NumModelReferences 0 + NumTestPointedSignals 0 + } + SavedCharacterEncoding "GBK" + SaveDefaultBlockParams on + ScopeRefreshTime 0.035000 + OverrideScopeRefreshTime on + DisableAllScopes off + DataTypeOverride "UseLocalSettings" + MinMaxOverflowLogging "UseLocalSettings" + MinMaxOverflowArchiveMode "Overwrite" + MaxMDLFileLineLength 120 + Created "Thu Oct 17 10:08:19 2013" + Creator "dmy" + UpdateHistory "UpdateHistoryNever" + ModifiedByFormat "%" + LastModifiedBy "dmy" + ModifiedDateFormat "%" + LastModifiedDate "Sat Oct 19 16:47:19 2013" + RTWModifiedTimeStamp 304102446 + ModelVersionFormat "1.%" + ConfigurationManager "None" + SampleTimeColors off + SampleTimeAnnotations off + LibraryLinkDisplay "none" + WideLines off + ShowLineDimensions off + ShowPortDataTypes off + ShowLoopsOnError on + IgnoreBidirectionalLines off + ShowStorageClass off + ShowTestPointIcons on + ShowSignalResolutionIcons on + ShowViewerIcons on + SortedOrder off + ExecutionContextIcon off + ShowLinearizationAnnotations on + BlockNameDataTip off + BlockParametersDataTip off + BlockDescriptionStringDataTip off + ToolBar on + StatusBar on + BrowserShowLibraryLinks off + BrowserLookUnderMasks off + SimulationMode "normal" + LinearizationMsg "none" + Profile off + ParamWorkspaceSource "MATLABWorkspace" + AccelSystemTargetFile "accel.tlc" + AccelTemplateMakefile "accel_default_tmf" + AccelMakeCommand "make_rtw" + TryForcingSFcnDF off + RecordCoverage off + CovPath "/" + CovSaveName "covdata" + CovMetricSettings "dw" + CovNameIncrementing off + CovHtmlReporting on + CovForceBlockReductionOff on + covSaveCumulativeToWorkspaceVar on + CovSaveSingleToWorkspaceVar on + CovCumulativeVarName "covCumulativeData" + CovCumulativeReport off + CovReportOnPause on + CovModelRefEnable "Off" + CovExternalEMLEnable off + ExtModeBatchMode off + ExtModeEnableFloating on + ExtModeTrigType "manual" + ExtModeTrigMode "normal" + ExtModeTrigPort "1" + ExtModeTrigElement "any" + ExtModeTrigDuration 1000 + ExtModeTrigDurationFloating "auto" + ExtModeTrigHoldOff 0 + ExtModeTrigDelay 0 + ExtModeTrigDirection "rising" + ExtModeTrigLevel 0 + ExtModeArchiveMode "off" + ExtModeAutoIncOneShot off + ExtModeIncDirWhenArm off + ExtModeAddSuffixToVar off + ExtModeWriteAllDataToWs off + ExtModeArmWhenConnect on + ExtModeSkipDownloadWhenConnect off + ExtModeLogAll on + ExtModeAutoUpdateStatusClock on + BufferReuse on + ShowModelReferenceBlockVersion off + ShowModelReferenceBlockIO off + Array { + Type "Handle" + Dimension 1 + Simulink.ConfigSet { + $ObjectID 1 + Version "1.10.0" + Array { + Type "Handle" + Dimension 9 + Simulink.SolverCC { + $ObjectID 2 + Version "1.10.0" + StartTime "0.0" + StopTime "96" + AbsTol "auto" + FixedStep "auto" + InitialStep "auto" + MaxNumMinSteps "-1" + MaxOrder 5 + ZcThreshold "auto" + ConsecutiveZCsStepRelTol "10*128*eps" + MaxConsecutiveZCs "1000" + ExtrapolationOrder 4 + NumberNewtonIterations 1 + MaxStep "auto" + MinStep "auto" + MaxConsecutiveMinStep "1" + RelTol "1e-3" + SolverMode "Auto" + Solver "ode45" + SolverName "ode45" + SolverJacobianMethodControl "auto" + ShapePreserveControl "DisableAll" + ZeroCrossControl "UseLocalSettings" + ZeroCrossAlgorithm "Nonadaptive" + AlgebraicLoopSolver "TrustRegion" + SolverResetMethod "Fast" + PositivePriorityOrder off + AutoInsertRateTranBlk off + SampleTimeConstraint "Unconstrained" + InsertRTBMode "Whenever possible" + } + Simulink.DataIOCC { + $ObjectID 3 + Version "1.10.0" + Decimation "1" + ExternalInput "[t, u]" + FinalStateName "xFinal" + InitialState "xInitial" + LimitDataPoints on + MaxDataPoints "1000" + LoadExternalInput off + LoadInitialState off + SaveFinalState off + SaveCompleteFinalSimState off + SaveFormat "Array" + SaveOutput on + SaveState off + SignalLogging on + DSMLogging on + InspectSignalLogs off + SaveTime on + ReturnWorkspaceOutputs off + StateSaveName "xout" + TimeSaveName "tout" + OutputSaveName "yout" + SignalLoggingName "logsout" + DSMLoggingName "dsmout" + OutputOption "RefineOutputTimes" + OutputTimes "[]" + ReturnWorkspaceOutputsName "out" + Refine "1" + } + Simulink.OptimizationCC { + $ObjectID 4 + Version "1.10.0" + Array { + Type "Cell" + Dimension 7 + Cell "BooleansAsBitfields" + Cell "PassReuseOutputArgsAs" + Cell "PassReuseOutputArgsThreshold" + Cell "ZeroExternalMemoryAtStartup" + Cell "ZeroInternalMemoryAtStartup" + Cell "OptimizeModelRefInitCode" + Cell "NoFixptDivByZeroProtection" + PropName "DisabledProps" + } + BlockReduction on + BooleanDataType on + ConditionallyExecuteInputs on + InlineParams off + UseIntDivNetSlope off + InlineInvariantSignals off + OptimizeBlockIOStorage on + BufferReuse on + EnhancedBackFolding off + StrengthReduction off + EnforceIntegerDowncast on + ExpressionFolding on + BooleansAsBitfields off + BitfieldContainerType "uint_T" + EnableMemcpy on + MemcpyThreshold 64 + PassReuseOutputArgsAs "Structure reference" + ExpressionDepthLimit 2147483647 + FoldNonRolledExpr on + LocalBlockOutputs on + RollThreshold 5 + SystemCodeInlineAuto off + StateBitsets off + DataBitsets off + UseTempVars off + ZeroExternalMemoryAtStartup on + ZeroInternalMemoryAtStartup on + InitFltsAndDblsToZero off + NoFixptDivByZeroProtection off + EfficientFloat2IntCast off + EfficientMapNaN2IntZero on + OptimizeModelRefInitCode off + LifeSpan "inf" + MaxStackSize "Inherit from target" + BufferReusableBoundary on + SimCompilerOptimization "Off" + AccelVerboseBuild off + } + Simulink.DebuggingCC { + $ObjectID 5 + Version "1.10.0" + RTPrefix "error" + ConsistencyChecking "none" + ArrayBoundsChecking "none" + SignalInfNanChecking "none" + SignalRangeChecking "none" + ReadBeforeWriteMsg "UseLocalSettings" + WriteAfterWriteMsg "UseLocalSettings" + WriteAfterReadMsg "UseLocalSettings" + AlgebraicLoopMsg "warning" + ArtificialAlgebraicLoopMsg "warning" + SaveWithDisabledLinksMsg "warning" + SaveWithParameterizedLinksMsg "warning" + CheckSSInitialOutputMsg on + UnderspecifiedInitializationDetection "Classic" + MergeDetectMultiDrivingBlocksExec "none" + CheckExecutionContextPreStartOutputMsg off + CheckExecutionContextRuntimeOutputMsg off + SignalResolutionControl "UseLocalSettings" + BlockPriorityViolationMsg "warning" + MinStepSizeMsg "warning" + TimeAdjustmentMsg "none" + MaxConsecutiveZCsMsg "error" + SolverPrmCheckMsg "warning" + InheritedTsInSrcMsg "warning" + DiscreteInheritContinuousMsg "warning" + MultiTaskDSMMsg "error" + MultiTaskCondExecSysMsg "error" + MultiTaskRateTransMsg "error" + SingleTaskRateTransMsg "none" + TasksWithSamePriorityMsg "warning" + SigSpecEnsureSampleTimeMsg "warning" + CheckMatrixSingularityMsg "none" + IntegerOverflowMsg "warning" + Int32ToFloatConvMsg "warning" + ParameterDowncastMsg "error" + ParameterOverflowMsg "error" + ParameterUnderflowMsg "none" + ParameterPrecisionLossMsg "warning" + ParameterTunabilityLossMsg "warning" + FixptConstUnderflowMsg "none" + FixptConstOverflowMsg "none" + FixptConstPrecisionLossMsg "none" + UnderSpecifiedDataTypeMsg "none" + UnnecessaryDatatypeConvMsg "none" + VectorMatrixConversionMsg "none" + InvalidFcnCallConnMsg "error" + FcnCallInpInsideContextMsg "Use local settings" + SignalLabelMismatchMsg "none" + UnconnectedInputMsg "warning" + UnconnectedOutputMsg "warning" + UnconnectedLineMsg "warning" + SFcnCompatibilityMsg "none" + UniqueDataStoreMsg "none" + BusObjectLabelMismatch "warning" + RootOutportRequireBusObject "warning" + AssertControl "UseLocalSettings" + EnableOverflowDetection off + ModelReferenceIOMsg "none" + ModelReferenceVersionMismatchMessage "none" + ModelReferenceIOMismatchMessage "none" + ModelReferenceCSMismatchMessage "none" + UnknownTsInhSupMsg "warning" + ModelReferenceDataLoggingMessage "warning" + ModelReferenceSymbolNameMessage "warning" + ModelReferenceExtraNoncontSigs "error" + StateNameClashWarn "warning" + SimStateInterfaceChecksumMismatchMsg "warning" + StrictBusMsg "ErrorLevel1" + BusNameAdapt "WarnAndRepair" + NonBusSignalsTreatedAsBus "none" + LoggingUnavailableSignals "error" + BlockIODiagnostic "none" + } + Simulink.HardwareCC { + $ObjectID 6 + Version "1.10.0" + ProdBitPerChar 8 + ProdBitPerShort 16 + ProdBitPerInt 32 + ProdBitPerLong 32 + ProdIntDivRoundTo "Undefined" + ProdEndianess "Unspecified" + ProdWordSize 32 + ProdShiftRightIntArith on + ProdHWDeviceType "32-bit Generic" + TargetBitPerChar 8 + TargetBitPerShort 16 + TargetBitPerInt 32 + TargetBitPerLong 32 + TargetShiftRightIntArith on + TargetIntDivRoundTo "Undefined" + TargetEndianess "Unspecified" + TargetWordSize 32 + TargetTypeEmulationWarnSuppressLevel 0 + TargetPreprocMaxBitsSint 32 + TargetPreprocMaxBitsUint 32 + TargetHWDeviceType "Specified" + TargetUnknown off + ProdEqTarget on + } + Simulink.ModelReferenceCC { + $ObjectID 7 + Version "1.10.0" + UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" + CheckModelReferenceTargetMessage "error" + EnableParallelModelReferenceBuilds off + ParallelModelReferenceMATLABWorkerInit "None" + ModelReferenceNumInstancesAllowed "Multi" + PropagateVarSize "Infer from blocks in model" + ModelReferencePassRootInputsByReference on + ModelReferenceMinAlgLoopOccurrences off + PropagateSignalLabelsOutOfModel off + SupportModelReferenceSimTargetCustomCode off + } + Simulink.SFSimCC { + $ObjectID 8 + Version "1.10.0" + SFSimEnableDebug on + SFSimOverflowDetection on + SFSimEcho on + SimBlas on + SimCtrlC on + SimExtrinsic on + SimIntegrity on + SimUseLocalCustomCode off + SimBuildMode "sf_incremental_build" + } + Simulink.RTWCC { + $BackupClass "Simulink.RTWCC" + $ObjectID 9 + Version "1.10.0" + Array { + Type "Cell" + Dimension 6 + Cell "IncludeHyperlinkInReport" + Cell "GenerateTraceInfo" + Cell "GenerateTraceReport" + Cell "GenerateTraceReportSl" + Cell "GenerateTraceReportSf" + Cell "GenerateTraceReportEml" + PropName "DisabledProps" + } + SystemTargetFile "grt.tlc" + GenCodeOnly off + MakeCommand "make_rtw" + GenerateMakefile on + TemplateMakefile "grt_default_tmf" + GenerateReport off + SaveLog off + RTWVerbose on + RetainRTWFile off + ProfileTLC off + TLCDebug off + TLCCoverage off + TLCAssert off + ProcessScriptMode "Default" + ConfigurationMode "Optimized" + ConfigAtBuild off + RTWUseLocalCustomCode off + RTWUseSimCustomCode off + IncludeHyperlinkInReport off + LaunchReport off + TargetLang "C" + IncludeBusHierarchyInRTWFileBlockHierarchyMap off + IncludeERTFirstTime off + GenerateTraceInfo off + GenerateTraceReport off + GenerateTraceReportSl off + GenerateTraceReportSf off + GenerateTraceReportEml off + GenerateCodeInfo off + RTWCompilerOptimization "Off" + CheckMdlBeforeBuild "Off" + CustomRebuildMode "OnUpdate" + Array { + Type "Handle" + Dimension 2 + Simulink.CodeAppCC { + $ObjectID 10 + Version "1.10.0" + Array { + Type "Cell" + Dimension 19 + Cell "IgnoreCustomStorageClasses" + Cell "IgnoreTestpoints" + Cell "InsertBlockDesc" + Cell "SFDataObjDesc" + Cell "SimulinkDataObjDesc" + Cell "DefineNamingRule" + Cell "SignalNamingRule" + Cell "ParamNamingRule" + Cell "InlinedPrmAccess" + Cell "CustomSymbolStr" + Cell "CustomSymbolStrGlobalVar" + Cell "CustomSymbolStrType" + Cell "CustomSymbolStrField" + Cell "CustomSymbolStrFcn" + Cell "CustomSymbolStrFcnArg" + Cell "CustomSymbolStrBlkIO" + Cell "CustomSymbolStrTmpVar" + Cell "CustomSymbolStrMacro" + Cell "ReqsInCode" + PropName "DisabledProps" + } + ForceParamTrailComments off + GenerateComments on + IgnoreCustomStorageClasses on + IgnoreTestpoints off + IncHierarchyInIds off + MaxIdLength 31 + PreserveName off + PreserveNameWithParent off + ShowEliminatedStatement off + IncAutoGenComments off + SimulinkDataObjDesc off + SFDataObjDesc off + IncDataTypeInIds off + MangleLength 1 + CustomSymbolStrGlobalVar "$R$N$M" + CustomSymbolStrType "$N$R$M" + CustomSymbolStrField "$N$M" + CustomSymbolStrFcn "$R$N$M$F" + CustomSymbolStrFcnArg "rt$I$N$M" + CustomSymbolStrBlkIO "rtb_$N$M" + CustomSymbolStrTmpVar "$N$M" + CustomSymbolStrMacro "$R$N$M" + DefineNamingRule "None" + ParamNamingRule "None" + SignalNamingRule "None" + InsertBlockDesc off + SimulinkBlockComments on + EnableCustomComments off + InlinedPrmAccess "Literals" + ReqsInCode off + UseSimReservedNames off + } + Simulink.GRTTargetCC { + $BackupClass "Simulink.TargetCC" + $ObjectID 11 + Version "1.10.0" + Array { + Type "Cell" + Dimension 17 + Cell "GeneratePreprocessorConditionals" + Cell "IncludeMdlTerminateFcn" + Cell "CombineOutputUpdateFcns" + Cell "SuppressErrorStatus" + Cell "ERTCustomFileBanners" + Cell "GenerateSampleERTMain" + Cell "GenerateTestInterfaces" + Cell "ModelStepFunctionPrototypeControlCompliant" + Cell "CPPClassGenCompliant" + Cell "MultiInstanceERTCode" + Cell "PurelyIntegerCode" + Cell "SupportNonFinite" + Cell "SupportComplex" + Cell "SupportAbsoluteTime" + Cell "SupportContinuousTime" + Cell "SupportNonInlinedSFcns" + Cell "PortableWordSizes" + PropName "DisabledProps" + } + TargetFcnLib "ansi_tfl_table_tmw.mat" + TargetLibSuffix "" + TargetPreCompLibLocation "" + TargetFunctionLibrary "ANSI_C" + UtilityFuncGeneration "Auto" + ERTMultiwordTypeDef "System defined" + ERTCodeCoverageTool "None" + ERTMultiwordLength 256 + MultiwordLength 2048 + GenerateFullHeader on + GenerateSampleERTMain off + GenerateTestInterfaces off + IsPILTarget off + ModelReferenceCompliant on + ParMdlRefBuildCompliant on + CompOptLevelCompliant on + IncludeMdlTerminateFcn on + GeneratePreprocessorConditionals "Disable all" + CombineOutputUpdateFcns off + SuppressErrorStatus off + ERTFirstTimeCompliant off + IncludeFileDelimiter "Auto" + ERTCustomFileBanners off + SupportAbsoluteTime on + LogVarNameModifier "rt_" + MatFileLogging on + MultiInstanceERTCode off + SupportNonFinite on + SupportComplex on + PurelyIntegerCode off + SupportContinuousTime on + SupportNonInlinedSFcns on + SupportVariableSizeSignals off + EnableShiftOperators on + ParenthesesLevel "Nominal" + PortableWordSizes off + ModelStepFunctionPrototypeControlCompliant off + CPPClassGenCompliant off + AutosarCompliant off + UseMalloc off + ExtMode off + ExtModeStaticAlloc off + ExtModeTesting off + ExtModeStaticAllocSize 1000000 + ExtModeTransport 0 + ExtModeMexFile "ext_comm" + ExtModeIntrfLevel "Level1" + RTWCAPISignals off + RTWCAPIParams off + RTWCAPIStates off + GenerateASAP2 off + } + PropName "Components" + } + } + hdlcoderui.hdlcc { + $ObjectID 12 + Version "1.10.0" + Description "HDL Coder custom configuration component" + Name "HDL Coder" + Array { + Type "Cell" + Dimension 1 + Cell "" + PropName "HDLConfigFile" + } + HDLCActiveTab "0" + } + PropName "Components" + } + Name "Configuration" + CurrentDlgPage "Solver" + ConfigPrmDlgPosition " [ 520, 225, 1400, 855 ] " + } + PropName "ConfigurationSets" + } + Simulink.ConfigSet { + $PropName "ActiveConfigurationSet" + $ObjectID 1 + } + BlockDefaults { + ForegroundColor "black" + BackgroundColor "white" + DropShadow off + NamePlacement "normal" + FontName "Helvetica" + FontSize 10 + FontWeight "normal" + FontAngle "normal" + ShowName on + BlockRotation 0 + BlockMirror off + } + AnnotationDefaults { + HorizontalAlignment "center" + VerticalAlignment "middle" + ForegroundColor "black" + BackgroundColor "white" + DropShadow off + FontName "Helvetica" + FontSize 10 + FontWeight "normal" + FontAngle "normal" + UseDisplayTextAsClickCallback off + } + LineDefaults { + FontName "Helvetica" + FontSize 9 + FontWeight "normal" + FontAngle "normal" + } + BlockParameterDefaults { + Block { + BlockType Clock + DisplayTime off + } + Block { + BlockType Fcn + Expr "sin(u[1])" + SampleTime "-1" + } + Block { + BlockType Scope + ModelBased off + TickLabels "OneTimeTick" + ZoomMode "on" + Grid "on" + TimeRange "auto" + YMin "-5" + YMax "5" + SaveToWorkspace off + SaveName "ScopeData" + LimitDataPoints on + MaxDataPoints "5000" + Decimation "1" + SampleInput off + SampleTime "-1" + } + } + System { + Name "Filtering" + Location [610, 390, 1194, 889] + Open on + ModelBrowserVisibility off + ModelBrowserWidth 200 + ScreenColor "white" + PaperOrientation "landscape" + PaperPositionMode "auto" + PaperType "A4" + PaperUnits "centimeters" + TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] + TiledPageScale 1 + ShowPageBoundaries off + ZoomFactor "100" + ReportName "simulink-default.rpt" + SIDHighWatermark 11 + Block { + BlockType Clock + Name "Clock" + SID 7 + Position [85, 245, 105, 265] + DisplayTime on + Decimation "10" + } + Block { + BlockType Fcn + Name "Fcn" + SID 8 + Position [175, 125, 235, 155] + Expr "0.01013*x(1)^4-2.24*x(1)^3152.2*x(1)^2+-2988*x(1)+2.74e4" + } + Block { + BlockType Scope + Name "Scope" + SID 6 + Ports [2] + Position [400, 131, 430, 164] + Floating off + Location [153, 268, 1586, 860] + Open off + NumInputPorts "2" + List { + ListType AxesTitles + axes1 "%" + axes2 "%" + } + YMin "-5~-5" + YMax "5~5" + DataFormat "StructureWithTime" + SampleTime "0" + } + Line { + SrcBlock "Fcn" + SrcPort 1 + DstBlock "Scope" + DstPort 1 + } + Line { + SrcBlock "Clock" + SrcPort 1 + Points [0, -25; 35, 0; 0, -20] + Branch { + Points [0, -70] + DstBlock "Fcn" + DstPort 1 + } + Branch { + Points [200, 0; 0, -55] + DstBlock "Scope" + DstPort 2 + } + } + } +} diff --git a/Filter/actxlicense.m b/Filter/actxlicense.m new file mode 100644 index 0000000..06414f2 --- /dev/null +++ b/Filter/actxlicense.m @@ -0,0 +1,6 @@ +function lic = actxlicense(progid) + +if strcmpi(progid, 'air.airctrl.1') +lic = 'Copyright (c) 1996 '; +return; +end diff --git a/Filter/curvefit.cfit b/Filter/curvefit.cfit new file mode 100644 index 0000000..0f9c020 Binary files /dev/null and b/Filter/curvefit.cfit differ diff --git a/Filter/璐熻嵎鏇茬嚎.xlsx b/Filter/璐熻嵎鏇茬嚎.xlsx new file mode 100644 index 0000000..9a83b47 Binary files /dev/null and b/Filter/璐熻嵎鏇茬嚎.xlsx differ diff --git a/GetMeasure.asv b/GetMeasure.asv new file mode 100644 index 0000000..c5717e7 --- /dev/null +++ b/GetMeasure.asv @@ -0,0 +1,14 @@ +function [ mVolt,PD0,QD0 ] = GetMeasure( sigma,rVolt,PD0,QD0 ) +%GETMEASURE Summary of this function goes here +% Detailed explanation goes here +mVolt=(1+normrnd(0,sigma,length(rVolt),1)).*rVolt; +t1=find(mVolt>(1+3*sigma)*rVolt); +t2=find(mVolt<(1-3*sigma)*rVolt); +if any(t1) || any(t2) + mVolt(t1)=(1+normrnd(0,sigma,length(rVolt),1)).*rVolt +end +PD0=(1+normrnd(0,sigma,length(PD0),1)).*rPD; +QD0=(1+normrnd(0,sigma,length(QD0),1)).*rQD; + +end + diff --git a/GetMeasure.m b/GetMeasure.m new file mode 100644 index 0000000..a7e583d --- /dev/null +++ b/GetMeasure.m @@ -0,0 +1,45 @@ +function [ mVolt,PD0,QD0,mLoadCurrent ] = GetMeasure( sigma,rVolt,rPD,rQD,rLoadCurrent ) +%GETMEASURE Summary of this function goes here +% Detailed explanation goes here +mVolt=(1+normrnd(0,sigma,length(rVolt),1)).*rVolt; +% t1=find(mVolt>(1+1*sigma)*rVolt); +% t2=find(mVolt<(1-1*sigma)*rVolt); +% while any(t1) || any(t2) +% mVolt(t1)=(1+normrnd(0,sigma,length(t1),1)).*rVolt(t1); +% mVolt(t2)=(1+normrnd(0,sigma,length(t2),1)).*rVolt(t2); +% t1=find(mVolt>(1+1*sigma)*rVolt); +% t2=find(mVolt<(1-1*sigma)*rVolt); +% end + +PD0=(1+normrnd(0,sigma,length(rPD),1)).*rPD; +% t1=find(PD0>(1+1*sigma)*rPD); +% t2=find(PD0<(1-1*sigma)*rPD); +% +% while any(t1)||any(t2) +% PD0(t1)=(1+normrnd(0,sigma,length(t1),1)).*rPD(t1); +% PD0(t2)=(1+normrnd(0,sigma,length(t2),1)).*rPD(t2); +% t1=find(PD0>(1+1*sigma)*rPD); +% t2=find(PD0<(1-1*sigma)*rPD); +% end +QD0=(1+normrnd(0,sigma,length(rQD),1)).*rQD; +% t1=find(QD0>(1+1*sigma)*rQD); +% t2=find(QD0<(1-1*sigma)*rQD); +% while any(t1)||any(t2) +% QD0(t1)=(1+normrnd(0,sigma,length(t1),1)).*rQD(t1); +% QD0(t2)=(1+normrnd(0,sigma,length(t2),1)).*rQD(t2); +% t1=find(QD0>(1+1*sigma)*rQD); +% t2=find(QD0<(1-1*sigma)*rQD); +% end + +mLoadCurrent=(1+normrnd(0,sigma,length(rLoadCurrent),1)).*rLoadCurrent; +t1=find(mLoadCurrent>(1+1*sigma)*rLoadCurrent); +t2=find(mLoadCurrent<(1-1*sigma)*rLoadCurrent); +while any(t1)||any(t2) + mLoadCurrent(t1)=(1+normrnd(0,sigma,length(t1),1)).*rLoadCurrent(t1); + mLoadCurrent(t2)=(1+normrnd(0,sigma,length(t2),1)).*rLoadCurrent(t2); + t1=find(mLoadCurrent>(1+1*sigma)*rLoadCurrent); + t2=find(mLoadCurrent<(1-1*sigma)*rLoadCurrent); +end + +end + diff --git a/I.mat b/I.mat new file mode 100644 index 0000000..c67a5b4 Binary files /dev/null and b/I.mat differ diff --git a/LineCurrent.asv b/LineCurrent.asv new file mode 100644 index 0000000..834e986 --- /dev/null +++ b/LineCurrent.asv @@ -0,0 +1,6 @@ +function [ output_args ] = LineCurrent( Linei,Linej,Liner,Linex,Volt,VAngle ) +cmpV=Volt.*exp(1j*VAngle); +GB=1./(Liner+1j*Linex); +cmpI= +end + diff --git a/LineCurrent.m b/LineCurrent.m new file mode 100644 index 0000000..d47624f --- /dev/null +++ b/LineCurrent.m @@ -0,0 +1,7 @@ +function [ output_args ] = LineCurrent( Linei,Linej,Liner,Linex,Volt,VAngle ) +cmpV=Volt.*exp(1j*VAngle); +GB=1./(Liner+1j*Linex); +cmpI=( cmpV(Linei)-cmpV(Linej) ).*GB; +output_args=abs(cmpI); +end + diff --git a/LoadCurrent.m b/LoadCurrent.m index 2d617c6..1835c6b 100644 --- a/LoadCurrent.m +++ b/LoadCurrent.m @@ -1,8 +1,9 @@ function [ output_args ] = LoadCurrent( Volt,VAngel,PD,QD,PDi,QDi ) %% 计算负荷电流 -cmpVolt=Volt.*exp(1j*VAngel); -t1=real(conj((PD+1j*QD)./cmpVolt(PDi))); +% cmpVolt=Volt.*exp(1j*VAngel); +% t1=real(conj((PD+1j*QD)./cmpVolt(PDi))); % t1=real(conj((PD+1j*QD)).*Volt(PDi)); +t1=(PD.^2+QD.^2)./Volt(PDi).^2; output_args=t1; end diff --git a/LoadCurve.m b/LoadCurve.m new file mode 100644 index 0000000..3c8ddcd --- /dev/null +++ b/LoadCurve.m @@ -0,0 +1,18 @@ +txt=dlmread('E:\书籍\论文\配电网状态估计\负荷.txt'); +txt=txt./10000; +x=1:length(txt); +plot(x,txt,'k'); +hold on +plot(x,txt*0.8,'k--'); +plot(x,txt*1.2,'k--'); +legend('典型负荷曲线','考虑波动后的负荷范围') + +ylabel('负荷值/kW') +xlabel('时间/时') +k=1; +for i=0:length(x)-1 + x1(k)=x(length(x)-i); + Z2(k)=txt(length(x)-i)*1.2; + k=k+1; +end +fill([x x1],[txt'*0.8 Z2],[240, 240, 240]./255,'edgealpha',0) diff --git a/MaxDeviation.m b/MaxDeviation.m index 6cd0287..6d3a14e 100644 --- a/MaxDeviation.m +++ b/MaxDeviation.m @@ -1,10 +1,11 @@ -function [output_arg]=MaxDeviation(rVolt,SEVolt,rVAngel,SEVAngel,rPD,rQD,PD,QD) -% t1=[rVolt;rVAngel;rPD;rQD]; -% t2=[SEVolt;SEVAngel;PD;QD]; -t1=[rPD;rQD]; -t2=[PD;QD]; +function [output_arg]=MaxDeviation(sigma,rVolt,SEVolt,rVAngel,SEVAngel,rPD,rQD,PD,QD) +t1=[rVolt;rVAngel;rPD;rQD]; +t2=[SEVolt;SEVAngel;PD;QD]; +% t1=[rVolt;rPD;rQD]; +% t2=[SEVolt;PD;QD]; t3=(t1(t1~=0)-double(t2(t1~=0)))./t1(t1~=0); t4=abs(t3); output_arg=max(t4); +find(t4==output_arg); end diff --git a/MaxSigma.asv b/MaxSigma.asv new file mode 100644 index 0000000..6350529 --- /dev/null +++ b/MaxSigma.asv @@ -0,0 +1,17 @@ +function [ output_args ] = MaxSigma( x,PDi,QDi,mPD,mQD,Volt0,sigma,rPD,rQD,rVolt ) +PD=x(1:length(PDi)); +QD=x(length(PDi)+1:length(PDi)+length(QDi)); +SEVolt=x(length(PDi)+length(QDi)+1:length(PDi)+length(QDi)+length(Volt0)); +t0=[] +r=[mPD(PDi)-PD;mQD(QDi)-QD;Volt0'-SEVolt]; +realVal=[rPD();rQD;rVolt]; +t1=r>3*sigma*realVal; +t2=r<-3*sigma*realVal; +if any(t1) + find(t1) +end +if any(t2) + find(t2) +end +end + diff --git a/MaxSigma.m b/MaxSigma.m new file mode 100644 index 0000000..7f977e4 --- /dev/null +++ b/MaxSigma.m @@ -0,0 +1,25 @@ +function [ output_args,t1,t2 ] = MaxSigma( x,PDi,QDi,mPD,mQD,mVolt,mLoadCurrent,sigma,rPD,rQD,rVolt,rLoadCurrent ) +PD=x(1:length(PDi)); +QD=x(length(PDi)+1:length(PDi)+length(QDi)); +SEVolt=x(length(PDi)+length(QDi)+1:length(PDi)+length(QDi)+length(mVolt)); +SEVAngel=x(length(PDi)+length(QDi)+length(mVolt)+1:end); +SECurrent=LoadCurrent( SEVolt,SEVAngel,PD,QD,PDi,QDi ); +r=[mPD(PDi)-PD;mQD(QDi)-QD;mVolt-SEVolt;mLoadCurrent-SECurrent]; +% realVal=[rPD(PDi);rQD(QDi);rVolt]; +realVal=sparse([PD;QD;SEVolt;rLoadCurrent]); +t1=r>3*sigma*realVal; +t2=r<-3*sigma*realVal; +% r./realVal +if any(t1) + find(t1) + output_args=1; + return; +end +if any(t2) + find(t2) + output_args=1; + return; +end +output_args=0; +end + diff --git a/NormalizedResiduals.asv b/NormalizedResiduals.asv new file mode 100644 index 0000000..781181c --- /dev/null +++ b/NormalizedResiduals.asv @@ -0,0 +1,9 @@ +function [ output_args ] = NormalizedResiduals(x,sigma,PDi,QDi,Volt0) +PD=x(1:length(PDi)); +QD=x(length(PDi)+1:length(PDi)+length(QDi)); +SEVolt=x(length(PDi)+length(QDi)+1:length(PDi)+length(QDi)+length(Volt0)); + +H=eye(length(PD)+length(QD)+length(SEVolt)); +R=sigma*eye*() +end + diff --git a/NormalizedResiduals.m b/NormalizedResiduals.m new file mode 100644 index 0000000..da4e214 --- /dev/null +++ b/NormalizedResiduals.m @@ -0,0 +1,17 @@ +function [ output_args ] = NormalizedResiduals(x,sigma,PDi,QDi,Volt0,mPD,mQD) +PD=x(1:length(PDi)); +QD=x(length(PDi)+1:length(PDi)+length(QDi)); +SEVolt=x(length(PDi)+length(QDi)+1:length(PDi)+length(QDi)+length(Volt0)); +mNum=length(PD)+length(QD)+length(SEVolt); %量测量数量 +% H=[eye(mNum),zeros(mNum,length(Volt0));]; +H=[eye(mNum)]; +R=sigma*eye(mNum); +G=H'*inv(R)*H; +K=H*inv(G)*H'*inv(R); +S=eye(mNum)-K; +omega=S*R; +r=[mPD(PDi)-PD;mQD(QDi)-QD;Volt0'-SEVolt]; +normR=abs(r)./diag(omega); +maxR=max(normR); +end + diff --git a/OPF_Init.asv b/OPF_Init.asv index 375b0f2..bc998fb 100644 --- a/OPF_Init.asv +++ b/OPF_Init.asv @@ -1,7 +1,9 @@ -function [Volt,UAngel,Init_Z,Init_W,Init_L,Init_U,Init_Y,PG,QG,RestraintCount,wPG,wQG,wPD,wQD,wVolt,wLoadCurrent,PD,PD0,QD,randPDind,Loadi,notLoadi]=OPF_Init(Busnum,Balance,PG,QG,Volt,GenU,GenL,PVi,PGi,PVQU,PVQL,PD0,QD0,QD,PD) -Loadi=find(QD~=0 | PD~=0); -PDi=find(PD~=0); -QDi=find(QD~=0); +function [Volt,UAngel,Init_Z,Init_W,Init_L,Init_U,Init_Y,PG,QG,RestraintCount,wPG,wQG,wPD,wQD,wVolt,wLoadCurrent,PD,PD0,QD,randPDind,Loadi,noLoadi]=OPF_Init(Busnum,Balance,PG,QG,rVolt,GenU,GenL,PVi,PGi,PVQU,PVQL,PD0,QD0,rQD,rPD,rLoadCurrent) +Loadi=find(rQD~=0 | rPD~=0); +PDi=find(rPD~=0); +%PDi=[10,11,23,19,22,20,12,13,14,15,8,18,25,17,24,16]; +%QDi=find(rQD~=0); +QDi=PDi; notLoadi=setdiff(1:Busnum,Loadi); PGOnly=setdiff(PGi,PDi); QGOnly=setdiff(PVi,QDi); @@ -13,7 +15,7 @@ noPGPDQGQD=setdiff(1:Busnum,union(union(PDi,PGi),union(QDi,PVi))); %Loadi=[1:Busnum]'; RestraintCount=size(PVi,1)+size(PGi,1)+size(Loadi,1)*1+Busnum*1; %约束条件数,放开所有QD,不单独约束QD上下限 RestraintCount=RestraintCount+length(Loadi); %加上功率因数,用功率因数约束QD -t_Bal_volt=Volt(Balance); +t_Bal_volt=rVolt(Balance); Volt=sparse(1*ones(1,Busnum)); Volt(Balance)=t_Bal_volt; UAngel=sparse(1,Busnum); @@ -33,20 +35,87 @@ wQG=1*ones(size(PVi,1),1); %randInt=randperm(size(Loadi,1)); %randPDind=randInt(1:10); randPDind=0; -wPD=1/0.05*zeros(length(PD),1); -wPD(1:2:end)=0; -wQD=1/0.05*zeros(length(QD),1); -wQD(1:2:end)=0; -wVolt=1/0.05*zeros(Busnum,1); -wVolt(1:2:end)=0; -wLoadCurrent=1/0.05*zeros(length(PDi),1); +% load('I'); +sigma=0.03; +% sigma=sigma*I/200; +% wPD=1/(1)*ones(length(PD),1); +% wPD(11)=wPD(11)*1; +% wQD=1/(1)*ones(length(QD),1); +% wQD(11)=wQD(11)*1; +% wVolt=1/(1)*ones(Busnum,1); +% wVolt(Balance)=0;% 不考虑平衡节点 +wLoadCurrent=1./(abs(rLoadCurrent)*sigma); +wPD=1./(abs(rPD)*sigma); +wQD=1./(abs(rQD)*sigma); +wVolt=1./(abs(rVolt)*sigma); +wPD(notLoadi)=0; +wQD(notLoadi)=0; +wVolt(notLoadi)=0; +%% 100% +% noLoad=[]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 90% +% noLoad=[17]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 80% +% noLoad=[16 18]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 70% +% noLoad=[15 19]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 60% +% noLoad=[15 17 19]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +% wLoadCurrent(noLoad)=0; +%% 50% +% noLoad=[10 11 14 15 25 17 22 20]; +% noLoad=[2 5 6 9]; +%noLoad=[3,5,6,9,11,12,15,17,20,21,22,23,27,29,30,31];%33节点 +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; % wLoadCurrent(1:2:end)=0; +%% 40% +% noLoad=[11 13 16 18 20]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 30% +% noLoad=[11 13 16 17 18 20]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 20% +% noLoad=[11 13 15 17 19 20]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 10% +% noLoad=[11 13 15 17 18 19 20]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 0% +% noLoad=[]; +% wPD(1:end)=0; +% wQD(1:end)=0; +% wVolt(1:end)=0; %wD(randPDind)=0;%一些负荷不约束 %wD(7)=0; % wD(11)=0; -PD=1*PD0; +PD=0.1*PD0; %powerFacter=0.98; %QD=PD*sqrt((1-powerFacter^2)/powerFacter^2); -QD=QD0; - +QD=0.1*QD0; +noLoadi=noLoad; end \ No newline at end of file diff --git a/OPF_Init.m b/OPF_Init.m index beaf250..bf57e09 100644 --- a/OPF_Init.m +++ b/OPF_Init.m @@ -1,7 +1,9 @@ -function [Volt,UAngel,Init_Z,Init_W,Init_L,Init_U,Init_Y,PG,QG,RestraintCount,wPG,wQG,wPD,wQD,wVolt,wLoadCurrent,PD,PD0,QD,randPDind,Loadi,notLoadi]=OPF_Init(Busnum,Balance,PG,QG,Volt,GenU,GenL,PVi,PGi,PVQU,PVQL,PD0,QD0,QD,PD) -Loadi=find(QD~=0 | PD~=0); -PDi=find(PD~=0); -QDi=find(QD~=0); +function [Volt,UAngel,Init_Z,Init_W,Init_L,Init_U,Init_Y,PG,QG,RestraintCount,wPG,wQG,wPD,wQD,wVolt,wLoadCurrent,PD,PD0,QD,randPDind,Loadi,noLoadi]=OPF_Init(Busnum,Balance,PG,QG,rVolt,GenU,GenL,PVi,PGi,PVQU,PVQL,PD0,QD0,rQD,rPD,rLoadCurrent) +Loadi=find(rQD~=0 | rPD~=0); +PDi=find(rPD~=0); +%PDi=[10,11,23,19,22,20,12,13,14,15,8,18,25,17,24,16]; +%QDi=find(rQD~=0); +QDi=PDi; notLoadi=setdiff(1:Busnum,Loadi); PGOnly=setdiff(PGi,PDi); QGOnly=setdiff(PVi,QDi); @@ -13,7 +15,7 @@ noPGPDQGQD=setdiff(1:Busnum,union(union(PDi,PGi),union(QDi,PVi))); %Loadi=[1:Busnum]'; RestraintCount=size(PVi,1)+size(PGi,1)+size(Loadi,1)*1+Busnum*1; %约束条件数,放开所有QD,不单独约束QD上下限 RestraintCount=RestraintCount+length(Loadi); %加上功率因数,用功率因数约束QD -t_Bal_volt=Volt(Balance); +t_Bal_volt=rVolt(Balance); Volt=sparse(1*ones(1,Busnum)); Volt(Balance)=t_Bal_volt; UAngel=sparse(1,Busnum); @@ -33,31 +35,87 @@ wQG=1*ones(size(PVi,1),1); %randInt=randperm(size(Loadi,1)); %randPDind=randInt(1:10); randPDind=0; -wPD=1/0.05*ones(length(PD),1); -wQD=1/0.05*ones(length(QD),1); -wVolt=1/0.05*ones(Busnum,1); -wLoadCurrent=1/0.05*ones(length(PDi),1); -%% 70% -% noLoad=[1;4;5;7;8;10;11;13;14;16;17;19;20;21]; +% load('I'); +sigma=0.03; +% sigma=sigma*I/200; +% wPD=1/(1)*ones(length(PD),1); +% wPD(11)=wPD(11)*1; +% wQD=1/(1)*ones(length(QD),1); +% wQD(11)=wQD(11)*1; +% wVolt=1/(1)*ones(Busnum,1); +% wVolt(Balance)=0;% 不考虑平衡节点 +wLoadCurrent=1./(abs(rLoadCurrent)*sigma); +wPD=1./(abs(rPD)*sigma); +wQD=1./(abs(rQD)*sigma); +wVolt=1./(abs(rVolt)*sigma); +wPD(notLoadi)=0; +wQD(notLoadi)=0; +wVolt(notLoadi)=0; +%% 100% +% noLoad=[]; % wPD(noLoad)=0; % wQD(noLoad)=0; % wVolt(noLoad)=0; +%% 90% +% noLoad=[17]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 80% +% noLoad=[16 18]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 70% +% noLoad=[15 19]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 60% +% noLoad=[15 17 19]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +% wLoadCurrent(noLoad)=0; %% 50% -% wPD(1:2:end)=0; -% wQD(1:2:end)=0; -% wVolt(1:2:end)=0; +% noLoad=[10 11 14 15 25 17 22 20]; +% noLoad=[2 5 6 9]; +% noLoad=[3,5,6,9,11,12,15,17,20,21,22,23,27,29,30,31];%33节点 +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; % wLoadCurrent(1:2:end)=0; +%% 40% +% noLoad=[11 13 16 18 20]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; %% 30% -noLoad=[1;5;7;11;15;20]; -wPD(noLoad)=0; -wQD(noLoad)=0; -wVolt(noLoad)=0; +% noLoad=[11 13 16 17 18 20]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 20% +% noLoad=[11 13 15 17 19 20]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 10% +% noLoad=[11 13 15 17 18 19 20]; +% wPD(noLoad)=0; +% wQD(noLoad)=0; +% wVolt(noLoad)=0; +%% 0% +noLoad=[]; +wPD(1:end)=0; +wQD(1:end)=0; +wVolt(1:end)=0; %wD(randPDind)=0;%一些负荷不约束 %wD(7)=0; % wD(11)=0; -PD=1*PD0; +PD=0.1*PD0; %powerFacter=0.98; %QD=PD*sqrt((1-powerFacter^2)/powerFacter^2); -QD=QD0; - +QD=0.1*QD0; +noLoadi=noLoad; end \ No newline at end of file diff --git a/PD0.mat b/PD0.mat index 2b451de..c3b650d 100644 Binary files a/PD0.mat and b/PD0.mat differ diff --git a/PD02.mat b/PD02.mat new file mode 100644 index 0000000..877ab55 Binary files /dev/null and b/PD02.mat differ diff --git a/PD03.mat b/PD03.mat new file mode 100644 index 0000000..fec1626 Binary files /dev/null and b/PD03.mat differ diff --git a/QD0.mat b/QD0.mat index 6a15376..daf716a 100644 Binary files a/QD0.mat and b/QD0.mat differ diff --git a/QD02.mat b/QD02.mat new file mode 100644 index 0000000..b8a90ea Binary files /dev/null and b/QD02.mat differ diff --git a/QD03.mat b/QD03.mat new file mode 100644 index 0000000..0afba9b Binary files /dev/null and b/QD03.mat differ diff --git a/ReadMe.txt b/ReadMe.txt new file mode 100644 index 0000000..934ff96 --- /dev/null +++ b/ReadMe.txt @@ -0,0 +1 @@ +2013.10.15 准备加入支路功率量测量试试,原来只有电压和负荷的效果太不好了,主要是负荷的估计效果不好。 \ No newline at end of file diff --git a/RealValuePlot.asv b/RealValuePlot.asv new file mode 100644 index 0000000..b170949 --- /dev/null +++ b/RealValuePlot.asv @@ -0,0 +1,83 @@ +function [ output_args ] = RealValuePlot(mPD,mQD,rPD,rQD,mVolt,rVolt,mVAngel,rVAngel) +x=1:length(mPD); +subplot(2,1,1); + plot(x,mPD); +hold on; +load('0PD'); +t=PD; +plot(x,PD,'kh'); +load('50PD'); +t=[PD]; +% plot(x,PD,'k+'); +load('100PD'); +t=[t,PD]; +% plot(x,PD,'kp'); +t=[t,rPD]; +bar(t); +legend('50%','100%','Actual'); +% plot(x,rPD,'k.'); +xlabel('负荷节点号'); +ylabel('负荷值/p.u'); +%% QD +subplot(2,1,2); +% plot(x,mQD); +hold on; +% load('0QD'); +% t=QD; +% plot(x,QD,'k-.'); +load('50QD'); +t=[QD]; +% plot(x,QD,'k--'); +load('100QD'); +t=[t,QD]; +% plot(x,QD,'k-'); +t=[t,rQD]; +bar(t); +legend('50%','100%','Actual'); +% plot(x,rQD,'k:'); +xlabel('负荷节点号'); +ylabel('负荷值/p.u'); +%% Volt +x=1:length(mVolt); +figure +subplot(2,1,1); +% plot(x,mVolt); +hold on; +% load('0SEVolt'); +% t=SEVolt; +% plot(x,SEVolt,'k-.'); +load('50SEVolt'); +t=[SEVolt]; +% plot(x,SEVolt,'k--'); +load('100SEVolt'); +t=[t,SEVolt]; +% plot(x,SEVolt,'k-'); +% plot(x,rVolt,'k:'); +t=[t,rVolt]; +bar(t); +legend('50%','100%','Actual'); +axis([0,22,0.95,1.01]); +xlabel('节点号'); +ylabel('电压/p.u'); +%% VAngle +subplot(2,1,2); +% plot(x,mVAngel); +hold on; +% load('0SEVAngel'); +% t=SEVAngel; +% plot(x,SEVAngel,'k-.'); +load('50SEVAngel'); +t=[SEVAngel]; +% plot(x,SEVAngel,'k--'); +load('100SEVAngel'); +t=[t,SEVAngel]; +% plot(x,SEVAngel,'k-'); +% plot(x,rVAngel,'k:'); +t=[t,rVAngel]; +bar(t); +legend('50%','100%','Actual'); +axis([1,22,-0.08,0]); +xlabel('节点号'); +ylabel('相角/p.u'); +end + diff --git a/RealValuePlot.m b/RealValuePlot.m new file mode 100644 index 0000000..79dcba0 --- /dev/null +++ b/RealValuePlot.m @@ -0,0 +1,124 @@ +function [ output_args ] = RealValuePlot(mPD,mQD,rPD,rQD,mVolt,rVolt,rVAngel) +x=1:length(mPD); +subplot(2,1,1); +% plot(x,mPD); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\100PD.mat'); +t=PD; +% plot(x,PD,'kh'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\50PD.mat'); +t=[t,PD]; +% plot(x,PD,'k+'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\0PD.mat'); +t=[t,PD]; +% plot(x,PD,'kp'); +% bars=bar(t); +% set(bars(1),'FaceColor',[1 1 1]); +% set(bars(2),'FaceColor',[1 1 1]); +% set(bars(3),'FaceColor',[1 1 1]); +% set(bars(4),'FaceColor',[1 1 1]) +% set(bars(5),'FaceColor',[1 1 1]); +hold on; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\100PD.mat'); +tt=[t,PD]; +% plot(x,PD,'kh'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\50PD.mat'); +tt=[tt,PD]; +% plot(x,PD,'k+'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\0PD.mat'); +tt=[tt,PD]; +% plot(x,PD,'kp'); +tt=[tt,rPD]; +tt=[tt,mPD]; +bars=bar([t,tt]); +set(bars(1),'FaceColor',[1 1 1]); +set(bars(2),'FaceColor',[1 1 1]); +set(bars(3),'FaceColor',[1 1 1]); +set(bars(4),'FaceColor',[1 1 1]) +set(bars(5),'FaceColor',[1 1 1]); +legend('0%','50%','100%','实际值','量测值','0%','50%','100%','实际值','量测值'); +% plot(x,rPD,'k.'); +xlabel('负荷节点号'); +ylabel('负荷值/p.u'); +%% QD +subplot(2,1,2); +% plot(x,mQD); +hold on; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\100QD.mat'); +t=QD; +% plot(x,QD,'k-.'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\50QD.mat'); +t=[t,QD]; +% plot(x,QD,'k--'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\0QD.mat'); +t=[t,QD]; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\100QD.mat'); +t=[t,QD]; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\50QD.mat'); +t=[t,QD]; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\0QD.mat'); +t=[t,QD]; +t=[t,rQD]; +tt=[t,mQD]; +% plot(x,QD,'k-'); +% bar(t); +legend('0%','50%','100%','实际值','量测值'); +% plot(x,rQD,'k:'); +xlabel('负荷节点号'); +ylabel('负荷值/p.u'); +%% Volt +x=1:length(mVolt); +figure +subplot(2,1,1); +% plot(x,mVolt); +hold on; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\100SEVolt.mat'); +t=SEVolt; +% plot(x,SEVolt,'k-.'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\50SEVolt.mat'); +t=[t,SEVolt]; +% plot(x,SEVolt,'k--'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\100SEVolt.mat'); +t=[t,SEVolt]; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\100SEVolt.mat'); +t=[t,SEVolt]; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\50SEVolt.mat'); +t=[t,SEVolt]; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\0SEVolt.mat'); +t=[t,SEVolt]; +% plot(x,SEVolt,'k-'); +% plot(x,rVolt,'k:'); +t=[t,rVolt]; +tt=[t,mVolt]; +% bar(t); +legend('0%','50%','100%','实际值','量测值'); +%axis([0,22,0.95,1.01]); +xlabel('节点号'); +ylabel('电压/p.u'); +%% VAngle +subplot(2,1,2); +% plot(x,mVAngel); +hold on; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\100SEVAngel.mat'); +t=SEVAngel; +% plot(x,SEVAngel,'k-.'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\50SEVAngel.mat'); +t=[t,SEVAngel]; +% plot(x,SEVAngel,'k--'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\20%\0SEVAngel.mat'); +t=[t,SEVAngel]; +% plot(x,SEVAngel,'k-'); +% plot(x,rVAngel,'k:'); +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\100SEVAngel.mat'); +t=[t,SEVAngel]; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\50SEVAngel.mat'); +t=[t,SEVAngel]; +load('D:\Matlab\StateEstimateionYALMIP-LU9\graph\9\20140327\容量\0SEVAngel.mat'); +t=[t,SEVAngel]; +tt=[t,rVAngel]; +% bar(t(2:end,:)); +legend('0%','50%','100%','实际值'); +%axis([1,22,-0.08,0]); +xlabel('节点号'); +ylabel('相角/p.u'); +end + diff --git a/Run_YALMIP.m b/Run_YALMIP.m index 4df1d06..b0de967 100644 --- a/Run_YALMIP.m +++ b/Run_YALMIP.m @@ -1,6 +1,5 @@ clc clear -clear % yalmip('clear') tic [kmax,Precision,UAngel,Volt,Busnum,PVi,PVu,Balance,Y,Angle,P0,Q0,r,c,GB, ... @@ -109,4 +108,5 @@ StatDeviation(rVolt,SEVolt,rVAngel,SEVAngel,rPD(PDi),rQD(QDi),PD,QD) %% 约束检查 % seOpti.equ(x); % sum([SEVolt;PD;QD]>cu(length(SEVolt)*2+2:end)); -% sum([SEVolt;PD;QD]cu(length(SEVolt)*2+2:end)); + % sum([SEVolt;PD;QD]cu(length(SEVolt)*2+2:end)); + % sum([SEVolt;PD;QD]0)+sum(find(wPD)>0)+sum(find(wQD)>0); + stE=StErrorS(SEVolt,SEVAngel,PD,QD,rVolt,rVAngel,rPD(PDi),rQD(QDi)); + fprintf('真实值统计误差为: %f',stE); + stE=StErrorZ(SEVolt,PD,QD,rVolt,mPD(PDi),mQD(QDi),noLoadi); + fprintf('测量值统计误差为: %f',stE); + NormalizedResiduals(x,sigma,PDi,QDi,Volt0,mPD,mQD); + SECurrent=LoadCurrent( SEVolt,SEVAngel,PD,QD,PDi,QDi ); + [flag,t1,t2]=MaxSigma( x,PDi,QDi,mPD,mQD,mVolt,mLoadCurrent,sigma,rPD,rQD,rVolt,rLoadCurrent ); + figure(); + SEMeasDeivation(PD,full(PD0(PDi)),QD,full(QD0(QDi)),rPD(PDi),rQD(QDi)); + [ok,msg] = checkSol(Opt); + figure(); + plotError( SEVolt,SEVAngel,rVolt,rVAngel,mVolt,PD,mPD(PDi),rPD(PDi),QD,mQD(QDi),rQD(QDi),PDi ); +% LineCurrent( Linei,Linej,Liner,Linex,Volt,VAngle ) + if flag==1 + I + t1 + t2 + break; + end +end \ No newline at end of file diff --git a/SEMeasDeivation.asv b/SEMeasDeivation.asv new file mode 100644 index 0000000..1a09384 --- /dev/null +++ b/SEMeasDeivation.asv @@ -0,0 +1,94 @@ +function SEMeasDeivation(SEPD,mPD,SEQD,mQD,rPD,rQD) +% SEPD=[0.008764457 +% 0.00662037 +% 0.003138456 +% 0.013582449 +% 0.01033048 +% 0.062267498 +% 0.001892282 +% -0.058256191 +% ]*100; +% mPD=[0.011028937; +% 0.017491189; +% 0.010876707; +% 0.02326443; +% 0.022649452; +% 0.070719554; +% 0.022716132; +% -0.044759963]*100; +% SEQD=[0.034669982; +% 0.012889814; +% -0.032514034; +% -0.000517975; +% 0.045225053; +% -0.014760862; +% 0.011850806; +% -0.03903512]*100; +% mQD=[0.035592708; +% 0.014869678; +% -0.03100282; +% 0.003020169; +% 0.050043998; +% -0.011974413; +% 0.018825594; +% -0.033640186]*100; + +% SEPD=[0.001561905; +% -0.020073342; +% 0.005002623; +% 0.021636979; +% 0.006405464; +% -0.018023242; +% -0.013238746; +% 0.019036188; +% ]*100; +% mPD=[0.002577934; +% -0.025909585; +% 0.000976724; +% 0.016575811; +% -0.00020548; +% -0.022269055; +% -0.023089977; +% 0.011141364; +% ]*100; +% SEQD=[-0.008447744; +% 0.000738829; +% 0.003884989; +% 0.017023719; +% -0.029683839; +% 0.017385226; +% 0.016485919; +% -0.014714749; +% ]*100; +% mQD=[-0.005321255; +% 0.003146241; +% 0.005934332; +% 0.021667621; +% -0.024133979; +% 0.020898732; +% 0.025052645; +% -0.007311454; +% ]*100; +SEPD=(SEPD-rPD)./rPD; +SEQD=(SEQD-rQD)./rQD; +mPD=(mPD-rPD)./rPD; +mQD=(mQD-rQD)./rQD; +x=1:length(mPD); +subplot(2,1,1); +plot(x,SEPD,'k'); +hold on; +plot(x,mPD,'k:'); +legend('负荷有功估计值','负荷有功量测值'); +xlabel('节点号'); +ylabel('偏差/%') +subplot(2,1,2); +plot(x,SEQD,'k'); +hold on; +plot(x,mQD,'k:'); +legend('负荷无功估计值','负荷无功量测值'); +xlabel('节点号'); +ylabel('偏差/%') +end + + + diff --git a/SEMeasDeivation.m b/SEMeasDeivation.m new file mode 100644 index 0000000..1a09384 --- /dev/null +++ b/SEMeasDeivation.m @@ -0,0 +1,94 @@ +function SEMeasDeivation(SEPD,mPD,SEQD,mQD,rPD,rQD) +% SEPD=[0.008764457 +% 0.00662037 +% 0.003138456 +% 0.013582449 +% 0.01033048 +% 0.062267498 +% 0.001892282 +% -0.058256191 +% ]*100; +% mPD=[0.011028937; +% 0.017491189; +% 0.010876707; +% 0.02326443; +% 0.022649452; +% 0.070719554; +% 0.022716132; +% -0.044759963]*100; +% SEQD=[0.034669982; +% 0.012889814; +% -0.032514034; +% -0.000517975; +% 0.045225053; +% -0.014760862; +% 0.011850806; +% -0.03903512]*100; +% mQD=[0.035592708; +% 0.014869678; +% -0.03100282; +% 0.003020169; +% 0.050043998; +% -0.011974413; +% 0.018825594; +% -0.033640186]*100; + +% SEPD=[0.001561905; +% -0.020073342; +% 0.005002623; +% 0.021636979; +% 0.006405464; +% -0.018023242; +% -0.013238746; +% 0.019036188; +% ]*100; +% mPD=[0.002577934; +% -0.025909585; +% 0.000976724; +% 0.016575811; +% -0.00020548; +% -0.022269055; +% -0.023089977; +% 0.011141364; +% ]*100; +% SEQD=[-0.008447744; +% 0.000738829; +% 0.003884989; +% 0.017023719; +% -0.029683839; +% 0.017385226; +% 0.016485919; +% -0.014714749; +% ]*100; +% mQD=[-0.005321255; +% 0.003146241; +% 0.005934332; +% 0.021667621; +% -0.024133979; +% 0.020898732; +% 0.025052645; +% -0.007311454; +% ]*100; +SEPD=(SEPD-rPD)./rPD; +SEQD=(SEQD-rQD)./rQD; +mPD=(mPD-rPD)./rPD; +mQD=(mQD-rQD)./rQD; +x=1:length(mPD); +subplot(2,1,1); +plot(x,SEPD,'k'); +hold on; +plot(x,mPD,'k:'); +legend('负荷有功估计值','负荷有功量测值'); +xlabel('节点号'); +ylabel('偏差/%') +subplot(2,1,2); +plot(x,SEQD,'k'); +hold on; +plot(x,mQD,'k:'); +legend('负荷无功估计值','负荷无功量测值'); +xlabel('节点号'); +ylabel('偏差/%') +end + + + diff --git a/StError.asv b/StError.asv new file mode 100644 index 0000000..e213e97 --- /dev/null +++ b/StError.asv @@ -0,0 +1,9 @@ +function [ output_args ] = StError( SEVolt,SEVangle,SEPD,SEQD,rVolt,rVangle,rSEPD,rSEQD ); +%STERROR Summary of this function goes here +% Detailed explanation goes here +t1=[SEVolt;SEVangle;SEPD;SEQD]; +t2=[rVolt,rVangle,rSEPD,rSEQD]; +t3=t1-t2 + +end + diff --git a/StErrorS.m b/StErrorS.m new file mode 100644 index 0000000..eeeba8e --- /dev/null +++ b/StErrorS.m @@ -0,0 +1,11 @@ +function [ output_args ] = StErrorS( SEVolt,SEVangle,SEPD,SEQD,rVolt,rVangle,rSEPD,rSEQD) +%STERROR Summary of this function goes here +% Detailed explanation goes here +t1=[SEVolt;SEVangle;SEPD;SEQD]; +t2=[rVolt;rVangle;rSEPD;rSEQD]; +m=length(t1); +t3=sum( ((t1-t2)./0.03).^2)/m; +output_args=t3^.5; + +end + diff --git a/StErrorZ.m b/StErrorZ.m new file mode 100644 index 0000000..6187d34 --- /dev/null +++ b/StErrorZ.m @@ -0,0 +1,17 @@ +function [ output_args ] = StErrorZ( SEVolt,SEPD,SEQD,rVolt,rSEPD,rSEQD,noLoadi) +%STERROR Summary of this function goes here +% Detailed explanation goes here +SEVolt(noLoadi)=0; +rVolt(noLoadi)=0; +SEPD(noLoadi)=0; +SEQD(noLoadi)=0; +rSEPD(noLoadi)=0; +rSEQD(noLoadi)=0; +t1=[SEVolt;SEPD;SEQD]; +t2=[rVolt;rSEPD;rSEQD]; +m=sum(find(t1>0)); +t3=sum( ((t1-t2)./0.03).^2)/m; +output_args=t3^.5; + +end + diff --git a/StatDeviation.asv b/StatDeviation.asv index c918720..43eddf2 100644 --- a/StatDeviation.asv +++ b/StatDeviation.asv @@ -1,16 +1,21 @@ -function [ output_args ] = StatDeviation( this,PG0,QG0,PD0,QD0 )%统计误差 +function [ output_args ] = StatDeviation(sigma,rVolt,SEVolt,rVAngel,SEVAngel,rPD,rQD,PD,QD)%统计误差 %STATDEVIATION Summary of this function goes here % Detailed explanation goes here PDArray=PD; -PD0Array=repmat(PD0,1,1); -QD0Array=repmat(QD0,1,1); -PDDev=(PDArray-PD0Array)/0.05; -QDDev=(QDArray-QD0Array)/0.05; -wholeMat=[PDDev;QDDev;]; +QDArray=QD; +% QD0Array=rVAngel; +PD0Array=repmat(rPD,1,1); +QD0Array=repmat(rQD,1,1); +PDDev=(PDArray-PD0Array)./PD0Array; +QDDev=(QDArray-QD0Array)./QD0Array; +VoltDev=(SEVolt-rVolt)./rVolt; +VAngelDev=(SEVAngel-rVAngel)/sigma; +wholeMat=[PDDev;QDDev;VoltDev;]; t1=wholeMat.^2; t2=sum(t1,1); t3=t2/size(t1,1); t4=t3.^.5; output_args=sum(t4)/length(t4); +output_args=sum(abs(wholeMat))/length(wholeMat); end diff --git a/StatDeviation.m b/StatDeviation.m index 1af90ff..2cf7f10 100644 --- a/StatDeviation.m +++ b/StatDeviation.m @@ -1,4 +1,4 @@ -function [ output_args ] = StatDeviation(rVolt,SEVolt,rVAngel,SEVAngel,rPD,rQD,PD,QD)%统计误差 +function [ output_args ] = StatDeviation(sigma,rVolt,SEVolt,rVAngel,SEVAngel,rPD,rQD,PD,QD)%统计误差 %STATDEVIATION Summary of this function goes here % Detailed explanation goes here PDArray=PD; @@ -6,15 +6,19 @@ QDArray=QD; % QD0Array=rVAngel; PD0Array=repmat(rPD,1,1); QD0Array=repmat(rQD,1,1); -PDDev=(PDArray-PD0Array)/0.05; -QDDev=(QDArray-QD0Array)/0.05; -VoltDev=(SEVolt-rVolt)/0.05; -VAngelDev=(SEVAngel-rVAngel)/0.05; -wholeMat=[VoltDev;VAngelDev]; -t1=wholeMat.^2; -t2=sum(t1,1); -t3=t2/size(t1,1); -t4=t3.^.5; -output_args=sum(t4)/length(t4); +PDDev=(PDArray-PD0Array)./PD0Array; +QDDev=(QDArray-QD0Array)./QD0Array; +VoltDev=(SEVolt-rVolt)./rVolt; +VAngelDev=(SEVAngel-rVAngel)./rVAngel; +% PDDev=(PDArray-PD0Array)./sigma; +% QDDev=(QDArray-QD0Array)./sigma; +% VoltDev=(SEVolt-rVolt)./sigma; +wholeMat=[PDDev;QDDev;VoltDev;VAngelDev(2:end)]; +% t1=wholeMat.^2; +% t2=sum(t1,1); +% t3=t2/size(t1,1); +% t4=t3.^.5; +% output_args=sum(t4)/length(t4); +output_args=sum(abs(wholeMat))/length(wholeMat); end diff --git a/graph/33/20140301/0PD.mat b/graph/33/20140301/0PD.mat new file mode 100644 index 0000000..4aafd7e Binary files /dev/null and b/graph/33/20140301/0PD.mat differ diff --git a/graph/33/20140301/0QD.mat b/graph/33/20140301/0QD.mat new file mode 100644 index 0000000..f96dd28 Binary files /dev/null and b/graph/33/20140301/0QD.mat differ diff --git a/graph/33/20140301/0SEVAngel.mat b/graph/33/20140301/0SEVAngel.mat new file mode 100644 index 0000000..f82d616 Binary files /dev/null and b/graph/33/20140301/0SEVAngel.mat differ diff --git a/graph/33/20140301/0SEVolt.mat b/graph/33/20140301/0SEVolt.mat new file mode 100644 index 0000000..0e78f4c Binary files /dev/null and b/graph/33/20140301/0SEVolt.mat differ diff --git a/graph/33/20140301/100PD.mat b/graph/33/20140301/100PD.mat new file mode 100644 index 0000000..262390c Binary files /dev/null and b/graph/33/20140301/100PD.mat differ diff --git a/graph/33/20140301/100QD.mat b/graph/33/20140301/100QD.mat new file mode 100644 index 0000000..f85c673 Binary files /dev/null and b/graph/33/20140301/100QD.mat differ diff --git a/graph/33/20140301/100SEVAngel.mat b/graph/33/20140301/100SEVAngel.mat new file mode 100644 index 0000000..ccf872b Binary files /dev/null and b/graph/33/20140301/100SEVAngel.mat differ diff --git a/graph/33/20140301/100SEVolt.mat b/graph/33/20140301/100SEVolt.mat new file mode 100644 index 0000000..6f65468 Binary files /dev/null and b/graph/33/20140301/100SEVolt.mat differ diff --git a/graph/33/20140301/50PD.mat b/graph/33/20140301/50PD.mat new file mode 100644 index 0000000..b5a22ce Binary files /dev/null and b/graph/33/20140301/50PD.mat differ diff --git a/graph/33/20140301/50QD.mat b/graph/33/20140301/50QD.mat new file mode 100644 index 0000000..936d114 Binary files /dev/null and b/graph/33/20140301/50QD.mat differ diff --git a/graph/33/20140301/50SEVAngel.mat b/graph/33/20140301/50SEVAngel.mat new file mode 100644 index 0000000..4589695 Binary files /dev/null and b/graph/33/20140301/50SEVAngel.mat differ diff --git a/graph/33/20140301/50SEVolt.mat b/graph/33/20140301/50SEVolt.mat new file mode 100644 index 0000000..5878516 Binary files /dev/null and b/graph/33/20140301/50SEVolt.mat differ diff --git a/graph/33/20140301/PD0.mat b/graph/33/20140301/PD0.mat new file mode 100644 index 0000000..d622260 Binary files /dev/null and b/graph/33/20140301/PD0.mat differ diff --git a/graph/33/20140301/QD0.mat b/graph/33/20140301/QD0.mat new file mode 100644 index 0000000..d882ba1 Binary files /dev/null and b/graph/33/20140301/QD0.mat differ diff --git a/graph/33/20140301/mLoadCurrent.mat b/graph/33/20140301/mLoadCurrent.mat new file mode 100644 index 0000000..16b3ca3 Binary files /dev/null and b/graph/33/20140301/mLoadCurrent.mat differ diff --git a/graph/33/20140301/mVolt.mat b/graph/33/20140301/mVolt.mat new file mode 100644 index 0000000..f9fc740 Binary files /dev/null and b/graph/33/20140301/mVolt.mat differ diff --git a/graph/33/20140327/0PD.mat b/graph/33/20140327/0PD.mat new file mode 100644 index 0000000..e7a6a61 Binary files /dev/null and b/graph/33/20140327/0PD.mat differ diff --git a/graph/33/20140327/0QD.mat b/graph/33/20140327/0QD.mat new file mode 100644 index 0000000..437051f Binary files /dev/null and b/graph/33/20140327/0QD.mat differ diff --git a/graph/33/20140327/0SEVAngel.mat b/graph/33/20140327/0SEVAngel.mat new file mode 100644 index 0000000..943283e Binary files /dev/null and b/graph/33/20140327/0SEVAngel.mat differ diff --git a/graph/33/20140327/0SEVolt.mat b/graph/33/20140327/0SEVolt.mat new file mode 100644 index 0000000..d7ccf04 Binary files /dev/null and b/graph/33/20140327/0SEVolt.mat differ diff --git a/graph/33/20140327/100PD.mat b/graph/33/20140327/100PD.mat new file mode 100644 index 0000000..5a697bc Binary files /dev/null and b/graph/33/20140327/100PD.mat differ diff --git a/graph/33/20140327/100QD.mat b/graph/33/20140327/100QD.mat new file mode 100644 index 0000000..9d2b98c Binary files /dev/null and b/graph/33/20140327/100QD.mat differ diff --git a/graph/33/20140327/100SEVAngel.mat b/graph/33/20140327/100SEVAngel.mat new file mode 100644 index 0000000..956740f Binary files /dev/null and b/graph/33/20140327/100SEVAngel.mat differ diff --git a/graph/33/20140327/100SEVolt.mat b/graph/33/20140327/100SEVolt.mat new file mode 100644 index 0000000..e18e9b2 Binary files /dev/null and b/graph/33/20140327/100SEVolt.mat differ diff --git a/graph/33/20140327/50PD.mat b/graph/33/20140327/50PD.mat new file mode 100644 index 0000000..6d2f168 Binary files /dev/null and b/graph/33/20140327/50PD.mat differ diff --git a/graph/33/20140327/50QD.mat b/graph/33/20140327/50QD.mat new file mode 100644 index 0000000..ad2102e Binary files /dev/null and b/graph/33/20140327/50QD.mat differ diff --git a/graph/33/20140327/50SEVAngel.mat b/graph/33/20140327/50SEVAngel.mat new file mode 100644 index 0000000..56cd91d Binary files /dev/null and b/graph/33/20140327/50SEVAngel.mat differ diff --git a/graph/33/20140327/50SEVolt.mat b/graph/33/20140327/50SEVolt.mat new file mode 100644 index 0000000..4ffa9b9 Binary files /dev/null and b/graph/33/20140327/50SEVolt.mat differ diff --git a/graph/33/20140327/PD0.mat b/graph/33/20140327/PD0.mat new file mode 100644 index 0000000..c3b650d Binary files /dev/null and b/graph/33/20140327/PD0.mat differ diff --git a/graph/33/20140327/QD0.mat b/graph/33/20140327/QD0.mat new file mode 100644 index 0000000..daf716a Binary files /dev/null and b/graph/33/20140327/QD0.mat differ diff --git a/graph/33/20140327/mLoadCurrent.mat b/graph/33/20140327/mLoadCurrent.mat new file mode 100644 index 0000000..0af71b5 Binary files /dev/null and b/graph/33/20140327/mLoadCurrent.mat differ diff --git a/graph/33/20140327/mVolt.mat b/graph/33/20140327/mVolt.mat new file mode 100644 index 0000000..acd16c3 Binary files /dev/null and b/graph/33/20140327/mVolt.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/0PD.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/0PD.mat new file mode 100644 index 0000000..4aafd7e Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/0PD.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/0QD.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/0QD.mat new file mode 100644 index 0000000..f96dd28 Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/0QD.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/0SEVAngel.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/0SEVAngel.mat new file mode 100644 index 0000000..f82d616 Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/0SEVAngel.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/0SEVolt.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/0SEVolt.mat new file mode 100644 index 0000000..0e78f4c Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/0SEVolt.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/100PD.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/100PD.mat new file mode 100644 index 0000000..262390c Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/100PD.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/100QD.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/100QD.mat new file mode 100644 index 0000000..f85c673 Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/100QD.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/100SEVAngel.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/100SEVAngel.mat new file mode 100644 index 0000000..ccf872b Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/100SEVAngel.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/100SEVolt.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/100SEVolt.mat new file mode 100644 index 0000000..6f65468 Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/100SEVolt.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/50PD.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/50PD.mat new file mode 100644 index 0000000..b5a22ce Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/50PD.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/50QD.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/50QD.mat new file mode 100644 index 0000000..936d114 Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/50QD.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/50SEVAngel.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/50SEVAngel.mat new file mode 100644 index 0000000..4589695 Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/50SEVAngel.mat differ diff --git a/graph/9/20140301/100%璐熻嵎鍋忕Щ/50SEVolt.mat b/graph/9/20140301/100%璐熻嵎鍋忕Щ/50SEVolt.mat new file mode 100644 index 0000000..5878516 Binary files /dev/null and b/graph/9/20140301/100%璐熻嵎鍋忕Щ/50SEVolt.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0PD.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0PD.mat new file mode 100644 index 0000000..bf3bf75 Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0PD.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0QD.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0QD.mat new file mode 100644 index 0000000..d992495 Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0QD.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0SEVAngel.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0SEVAngel.mat new file mode 100644 index 0000000..32a3a9d Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0SEVAngel.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0SEVolt.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0SEVolt.mat new file mode 100644 index 0000000..55023f7 Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/0SEVolt.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100PD.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100PD.mat new file mode 100644 index 0000000..345be4f Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100PD.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100QD.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100QD.mat new file mode 100644 index 0000000..e6d9ee6 Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100QD.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100SEVAngel.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100SEVAngel.mat new file mode 100644 index 0000000..9630096 Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100SEVAngel.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100SEVolt.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100SEVolt.mat new file mode 100644 index 0000000..9338124 Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/100SEVolt.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50PD.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50PD.mat new file mode 100644 index 0000000..8ed6b82 Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50PD.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50QD.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50QD.mat new file mode 100644 index 0000000..a3f5182 Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50QD.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50SEVAngel.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50SEVAngel.mat new file mode 100644 index 0000000..b597862 Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50SEVAngel.mat differ diff --git a/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50SEVolt.mat b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50SEVolt.mat new file mode 100644 index 0000000..2d22948 Binary files /dev/null and b/graph/9/20140301/20%璐熻嵎鍋忕Щ鏇茬嚎/50SEVolt.mat differ diff --git a/graph/9/20140301/PD0.mat b/graph/9/20140301/PD0.mat new file mode 100644 index 0000000..4d8418a Binary files /dev/null and b/graph/9/20140301/PD0.mat differ diff --git a/graph/9/20140301/QD0.mat b/graph/9/20140301/QD0.mat new file mode 100644 index 0000000..688c991 Binary files /dev/null and b/graph/9/20140301/QD0.mat differ diff --git a/graph/9/20140301/mVolt.mat b/graph/9/20140301/mVolt.mat new file mode 100644 index 0000000..72e72cc Binary files /dev/null and b/graph/9/20140301/mVolt.mat differ diff --git a/graph/9/20140302/0PD.mat b/graph/9/20140302/0PD.mat new file mode 100644 index 0000000..202ac84 Binary files /dev/null and b/graph/9/20140302/0PD.mat differ diff --git a/graph/9/20140302/0QD.mat b/graph/9/20140302/0QD.mat new file mode 100644 index 0000000..3c970cb Binary files /dev/null and b/graph/9/20140302/0QD.mat differ diff --git a/graph/9/20140302/0SEVAngel.mat b/graph/9/20140302/0SEVAngel.mat new file mode 100644 index 0000000..679b187 Binary files /dev/null and b/graph/9/20140302/0SEVAngel.mat differ diff --git a/graph/9/20140302/0SEVolt.mat b/graph/9/20140302/0SEVolt.mat new file mode 100644 index 0000000..9f66bbf Binary files /dev/null and b/graph/9/20140302/0SEVolt.mat differ diff --git a/graph/9/20140302/100PD.mat b/graph/9/20140302/100PD.mat new file mode 100644 index 0000000..d814d50 Binary files /dev/null and b/graph/9/20140302/100PD.mat differ diff --git a/graph/9/20140302/100QD.mat b/graph/9/20140302/100QD.mat new file mode 100644 index 0000000..187f89d Binary files /dev/null and b/graph/9/20140302/100QD.mat differ diff --git a/graph/9/20140302/100SEVAngel.mat b/graph/9/20140302/100SEVAngel.mat new file mode 100644 index 0000000..4d21b48 Binary files /dev/null and b/graph/9/20140302/100SEVAngel.mat differ diff --git a/graph/9/20140302/100SEVolt.mat b/graph/9/20140302/100SEVolt.mat new file mode 100644 index 0000000..9f93744 Binary files /dev/null and b/graph/9/20140302/100SEVolt.mat differ diff --git a/graph/9/20140302/50PD.mat b/graph/9/20140302/50PD.mat new file mode 100644 index 0000000..d9bfe5c Binary files /dev/null and b/graph/9/20140302/50PD.mat differ diff --git a/graph/9/20140302/50QD.mat b/graph/9/20140302/50QD.mat new file mode 100644 index 0000000..f3c0a19 Binary files /dev/null and b/graph/9/20140302/50QD.mat differ diff --git a/graph/9/20140302/50SEVAngel.mat b/graph/9/20140302/50SEVAngel.mat new file mode 100644 index 0000000..1de9c13 Binary files /dev/null and b/graph/9/20140302/50SEVAngel.mat differ diff --git a/graph/9/20140302/50SEVolt.mat b/graph/9/20140302/50SEVolt.mat new file mode 100644 index 0000000..72e46f1 Binary files /dev/null and b/graph/9/20140302/50SEVolt.mat differ diff --git a/graph/9/20140302/PD0.mat b/graph/9/20140302/PD0.mat new file mode 100644 index 0000000..d0bb488 Binary files /dev/null and b/graph/9/20140302/PD0.mat differ diff --git a/graph/9/20140302/QD0.mat b/graph/9/20140302/QD0.mat new file mode 100644 index 0000000..8f07d77 Binary files /dev/null and b/graph/9/20140302/QD0.mat differ diff --git a/graph/9/20140302/mLoadCurrent.mat b/graph/9/20140302/mLoadCurrent.mat new file mode 100644 index 0000000..c74aac2 Binary files /dev/null and b/graph/9/20140302/mLoadCurrent.mat differ diff --git a/graph/9/20140302/mVolt.mat b/graph/9/20140302/mVolt.mat new file mode 100644 index 0000000..bd521a4 Binary files /dev/null and b/graph/9/20140302/mVolt.mat differ diff --git a/graph/9/20140318/20%/0PD.mat b/graph/9/20140318/20%/0PD.mat new file mode 100644 index 0000000..e0edb1f Binary files /dev/null and b/graph/9/20140318/20%/0PD.mat differ diff --git a/graph/9/20140318/20%/0QD.mat b/graph/9/20140318/20%/0QD.mat new file mode 100644 index 0000000..2068ebe Binary files /dev/null and b/graph/9/20140318/20%/0QD.mat differ diff --git a/graph/9/20140318/20%/0SEVAngel.mat b/graph/9/20140318/20%/0SEVAngel.mat new file mode 100644 index 0000000..f314cb0 Binary files /dev/null and b/graph/9/20140318/20%/0SEVAngel.mat differ diff --git a/graph/9/20140318/20%/0SEVolt.mat b/graph/9/20140318/20%/0SEVolt.mat new file mode 100644 index 0000000..db9dcfd Binary files /dev/null and b/graph/9/20140318/20%/0SEVolt.mat differ diff --git a/graph/9/20140318/20%/100PD.mat b/graph/9/20140318/20%/100PD.mat new file mode 100644 index 0000000..2562498 Binary files /dev/null and b/graph/9/20140318/20%/100PD.mat differ diff --git a/graph/9/20140318/20%/100QD.mat b/graph/9/20140318/20%/100QD.mat new file mode 100644 index 0000000..9e01102 Binary files /dev/null and b/graph/9/20140318/20%/100QD.mat differ diff --git a/graph/9/20140318/20%/100SEVAngel.mat b/graph/9/20140318/20%/100SEVAngel.mat new file mode 100644 index 0000000..5c4d118 Binary files /dev/null and b/graph/9/20140318/20%/100SEVAngel.mat differ diff --git a/graph/9/20140318/20%/100SEVolt.mat b/graph/9/20140318/20%/100SEVolt.mat new file mode 100644 index 0000000..7d888b4 Binary files /dev/null and b/graph/9/20140318/20%/100SEVolt.mat differ diff --git a/graph/9/20140318/20%/50PD.mat b/graph/9/20140318/20%/50PD.mat new file mode 100644 index 0000000..bb1c5b0 Binary files /dev/null and b/graph/9/20140318/20%/50PD.mat differ diff --git a/graph/9/20140318/20%/50QD.mat b/graph/9/20140318/20%/50QD.mat new file mode 100644 index 0000000..351d3c0 Binary files /dev/null and b/graph/9/20140318/20%/50QD.mat differ diff --git a/graph/9/20140318/20%/50SEVAngel.mat b/graph/9/20140318/20%/50SEVAngel.mat new file mode 100644 index 0000000..5720469 Binary files /dev/null and b/graph/9/20140318/20%/50SEVAngel.mat differ diff --git a/graph/9/20140318/20%/50SEVolt.mat b/graph/9/20140318/20%/50SEVolt.mat new file mode 100644 index 0000000..b123e5d Binary files /dev/null and b/graph/9/20140318/20%/50SEVolt.mat differ diff --git a/graph/9/20140318/20%/PD0.mat b/graph/9/20140318/20%/PD0.mat new file mode 100644 index 0000000..4abae93 Binary files /dev/null and b/graph/9/20140318/20%/PD0.mat differ diff --git a/graph/9/20140318/20%/QD0.mat b/graph/9/20140318/20%/QD0.mat new file mode 100644 index 0000000..7b9973c Binary files /dev/null and b/graph/9/20140318/20%/QD0.mat differ diff --git a/graph/9/20140318/20%/mLoadCurrent.mat b/graph/9/20140318/20%/mLoadCurrent.mat new file mode 100644 index 0000000..18fd67b Binary files /dev/null and b/graph/9/20140318/20%/mLoadCurrent.mat differ diff --git a/graph/9/20140318/20%/mVolt.mat b/graph/9/20140318/20%/mVolt.mat new file mode 100644 index 0000000..8f78ce0 Binary files /dev/null and b/graph/9/20140318/20%/mVolt.mat differ diff --git a/graph/9/20140318/瀹归噺/0PD.mat b/graph/9/20140318/瀹归噺/0PD.mat new file mode 100644 index 0000000..52be575 Binary files /dev/null and b/graph/9/20140318/瀹归噺/0PD.mat differ diff --git a/graph/9/20140318/瀹归噺/0QD.mat b/graph/9/20140318/瀹归噺/0QD.mat new file mode 100644 index 0000000..36e55d0 Binary files /dev/null and b/graph/9/20140318/瀹归噺/0QD.mat differ diff --git a/graph/9/20140318/瀹归噺/0SEVAngel.mat b/graph/9/20140318/瀹归噺/0SEVAngel.mat new file mode 100644 index 0000000..e09dba5 Binary files /dev/null and b/graph/9/20140318/瀹归噺/0SEVAngel.mat differ diff --git a/graph/9/20140318/瀹归噺/0SEVolt.mat b/graph/9/20140318/瀹归噺/0SEVolt.mat new file mode 100644 index 0000000..cd3eef6 Binary files /dev/null and b/graph/9/20140318/瀹归噺/0SEVolt.mat differ diff --git a/graph/9/20140318/瀹归噺/100PD.mat b/graph/9/20140318/瀹归噺/100PD.mat new file mode 100644 index 0000000..45a2ce4 Binary files /dev/null and b/graph/9/20140318/瀹归噺/100PD.mat differ diff --git a/graph/9/20140318/瀹归噺/100QD.mat b/graph/9/20140318/瀹归噺/100QD.mat new file mode 100644 index 0000000..8a1d6e4 Binary files /dev/null and b/graph/9/20140318/瀹归噺/100QD.mat differ diff --git a/graph/9/20140318/瀹归噺/100SEVAngel.mat b/graph/9/20140318/瀹归噺/100SEVAngel.mat new file mode 100644 index 0000000..995d724 Binary files /dev/null and b/graph/9/20140318/瀹归噺/100SEVAngel.mat differ diff --git a/graph/9/20140318/瀹归噺/100SEVolt.mat b/graph/9/20140318/瀹归噺/100SEVolt.mat new file mode 100644 index 0000000..854b4e1 Binary files /dev/null and b/graph/9/20140318/瀹归噺/100SEVolt.mat differ diff --git a/graph/9/20140318/瀹归噺/50PD.mat b/graph/9/20140318/瀹归噺/50PD.mat new file mode 100644 index 0000000..043c6f0 Binary files /dev/null and b/graph/9/20140318/瀹归噺/50PD.mat differ diff --git a/graph/9/20140318/瀹归噺/50QD.mat b/graph/9/20140318/瀹归噺/50QD.mat new file mode 100644 index 0000000..aaa1355 Binary files /dev/null and b/graph/9/20140318/瀹归噺/50QD.mat differ diff --git a/graph/9/20140318/瀹归噺/50SEVAngel.mat b/graph/9/20140318/瀹归噺/50SEVAngel.mat new file mode 100644 index 0000000..cf01ebf Binary files /dev/null and b/graph/9/20140318/瀹归噺/50SEVAngel.mat differ diff --git a/graph/9/20140318/瀹归噺/50SEVolt.mat b/graph/9/20140318/瀹归噺/50SEVolt.mat new file mode 100644 index 0000000..8eaa517 Binary files /dev/null and b/graph/9/20140318/瀹归噺/50SEVolt.mat differ diff --git a/graph/9/20140318/瀹归噺/PD0.mat b/graph/9/20140318/瀹归噺/PD0.mat new file mode 100644 index 0000000..4abae93 Binary files /dev/null and b/graph/9/20140318/瀹归噺/PD0.mat differ diff --git a/graph/9/20140318/瀹归噺/QD0.mat b/graph/9/20140318/瀹归噺/QD0.mat new file mode 100644 index 0000000..7b9973c Binary files /dev/null and b/graph/9/20140318/瀹归噺/QD0.mat differ diff --git a/graph/9/20140318/瀹归噺/mLoadCurrent.mat b/graph/9/20140318/瀹归噺/mLoadCurrent.mat new file mode 100644 index 0000000..18fd67b Binary files /dev/null and b/graph/9/20140318/瀹归噺/mLoadCurrent.mat differ diff --git a/graph/9/20140318/瀹归噺/mVolt.mat b/graph/9/20140318/瀹归噺/mVolt.mat new file mode 100644 index 0000000..8f78ce0 Binary files /dev/null and b/graph/9/20140318/瀹归噺/mVolt.mat differ diff --git a/graph/9/20140327/20%/0PD.mat b/graph/9/20140327/20%/0PD.mat new file mode 100644 index 0000000..847d71e Binary files /dev/null and b/graph/9/20140327/20%/0PD.mat differ diff --git a/graph/9/20140327/20%/0QD.mat b/graph/9/20140327/20%/0QD.mat new file mode 100644 index 0000000..325d003 Binary files /dev/null and b/graph/9/20140327/20%/0QD.mat differ diff --git a/graph/9/20140327/20%/0SEVAngel.mat b/graph/9/20140327/20%/0SEVAngel.mat new file mode 100644 index 0000000..6b0968a Binary files /dev/null and b/graph/9/20140327/20%/0SEVAngel.mat differ diff --git a/graph/9/20140327/20%/0SEVolt.mat b/graph/9/20140327/20%/0SEVolt.mat new file mode 100644 index 0000000..f71397a Binary files /dev/null and b/graph/9/20140327/20%/0SEVolt.mat differ diff --git a/graph/9/20140327/20%/100PD.mat b/graph/9/20140327/20%/100PD.mat new file mode 100644 index 0000000..2b9c3dc Binary files /dev/null and b/graph/9/20140327/20%/100PD.mat differ diff --git a/graph/9/20140327/20%/100QD.mat b/graph/9/20140327/20%/100QD.mat new file mode 100644 index 0000000..c0c9036 Binary files /dev/null and b/graph/9/20140327/20%/100QD.mat differ diff --git a/graph/9/20140327/20%/100SEVAngel.mat b/graph/9/20140327/20%/100SEVAngel.mat new file mode 100644 index 0000000..3829594 Binary files /dev/null and b/graph/9/20140327/20%/100SEVAngel.mat differ diff --git a/graph/9/20140327/20%/100SEVolt.mat b/graph/9/20140327/20%/100SEVolt.mat new file mode 100644 index 0000000..911d8c2 Binary files /dev/null and b/graph/9/20140327/20%/100SEVolt.mat differ diff --git a/graph/9/20140327/20%/50PD.mat b/graph/9/20140327/20%/50PD.mat new file mode 100644 index 0000000..a65ed49 Binary files /dev/null and b/graph/9/20140327/20%/50PD.mat differ diff --git a/graph/9/20140327/20%/50QD.mat b/graph/9/20140327/20%/50QD.mat new file mode 100644 index 0000000..31c1768 Binary files /dev/null and b/graph/9/20140327/20%/50QD.mat differ diff --git a/graph/9/20140327/20%/50SEVAngel.mat b/graph/9/20140327/20%/50SEVAngel.mat new file mode 100644 index 0000000..d109905 Binary files /dev/null and b/graph/9/20140327/20%/50SEVAngel.mat differ diff --git a/graph/9/20140327/20%/50SEVolt.mat b/graph/9/20140327/20%/50SEVolt.mat new file mode 100644 index 0000000..c4832a9 Binary files /dev/null and b/graph/9/20140327/20%/50SEVolt.mat differ diff --git a/graph/9/20140327/20%/PD0.mat b/graph/9/20140327/20%/PD0.mat new file mode 100644 index 0000000..c397577 Binary files /dev/null and b/graph/9/20140327/20%/PD0.mat differ diff --git a/graph/9/20140327/20%/QD0.mat b/graph/9/20140327/20%/QD0.mat new file mode 100644 index 0000000..f1bac08 Binary files /dev/null and b/graph/9/20140327/20%/QD0.mat differ diff --git a/graph/9/20140327/20%/mLoadCurrent.mat b/graph/9/20140327/20%/mLoadCurrent.mat new file mode 100644 index 0000000..c6536f7 Binary files /dev/null and b/graph/9/20140327/20%/mLoadCurrent.mat differ diff --git a/graph/9/20140327/20%/mVolt.mat b/graph/9/20140327/20%/mVolt.mat new file mode 100644 index 0000000..afe98a8 Binary files /dev/null and b/graph/9/20140327/20%/mVolt.mat differ diff --git a/graph/9/20140327/瀹归噺/0PD.mat b/graph/9/20140327/瀹归噺/0PD.mat new file mode 100644 index 0000000..890acf5 Binary files /dev/null and b/graph/9/20140327/瀹归噺/0PD.mat differ diff --git a/graph/9/20140327/瀹归噺/0QD.mat b/graph/9/20140327/瀹归噺/0QD.mat new file mode 100644 index 0000000..e238a01 Binary files /dev/null and b/graph/9/20140327/瀹归噺/0QD.mat differ diff --git a/graph/9/20140327/瀹归噺/0SEVAngel.mat b/graph/9/20140327/瀹归噺/0SEVAngel.mat new file mode 100644 index 0000000..6695b64 Binary files /dev/null and b/graph/9/20140327/瀹归噺/0SEVAngel.mat differ diff --git a/graph/9/20140327/瀹归噺/0SEVolt.mat b/graph/9/20140327/瀹归噺/0SEVolt.mat new file mode 100644 index 0000000..8c97e81 Binary files /dev/null and b/graph/9/20140327/瀹归噺/0SEVolt.mat differ diff --git a/graph/9/20140327/瀹归噺/100PD.mat b/graph/9/20140327/瀹归噺/100PD.mat new file mode 100644 index 0000000..4ae4d0d Binary files /dev/null and b/graph/9/20140327/瀹归噺/100PD.mat differ diff --git a/graph/9/20140327/瀹归噺/100QD.mat b/graph/9/20140327/瀹归噺/100QD.mat new file mode 100644 index 0000000..576ec71 Binary files /dev/null and b/graph/9/20140327/瀹归噺/100QD.mat differ diff --git a/graph/9/20140327/瀹归噺/100SEVAngel.mat b/graph/9/20140327/瀹归噺/100SEVAngel.mat new file mode 100644 index 0000000..38549fb Binary files /dev/null and b/graph/9/20140327/瀹归噺/100SEVAngel.mat differ diff --git a/graph/9/20140327/瀹归噺/100SEVolt.mat b/graph/9/20140327/瀹归噺/100SEVolt.mat new file mode 100644 index 0000000..90df487 Binary files /dev/null and b/graph/9/20140327/瀹归噺/100SEVolt.mat differ diff --git a/graph/9/20140327/瀹归噺/50PD.mat b/graph/9/20140327/瀹归噺/50PD.mat new file mode 100644 index 0000000..90fb67d Binary files /dev/null and b/graph/9/20140327/瀹归噺/50PD.mat differ diff --git a/graph/9/20140327/瀹归噺/50QD.mat b/graph/9/20140327/瀹归噺/50QD.mat new file mode 100644 index 0000000..5a7a51b Binary files /dev/null and b/graph/9/20140327/瀹归噺/50QD.mat differ diff --git a/graph/9/20140327/瀹归噺/50SEVAngel.mat b/graph/9/20140327/瀹归噺/50SEVAngel.mat new file mode 100644 index 0000000..c07aabd Binary files /dev/null and b/graph/9/20140327/瀹归噺/50SEVAngel.mat differ diff --git a/graph/9/20140327/瀹归噺/50SEVolt.mat b/graph/9/20140327/瀹归噺/50SEVolt.mat new file mode 100644 index 0000000..af61964 Binary files /dev/null and b/graph/9/20140327/瀹归噺/50SEVolt.mat differ diff --git a/graph/9/20140327/瀹归噺/PD0.mat b/graph/9/20140327/瀹归噺/PD0.mat new file mode 100644 index 0000000..c397577 Binary files /dev/null and b/graph/9/20140327/瀹归噺/PD0.mat differ diff --git a/graph/9/20140327/瀹归噺/QD0.mat b/graph/9/20140327/瀹归噺/QD0.mat new file mode 100644 index 0000000..f1bac08 Binary files /dev/null and b/graph/9/20140327/瀹归噺/QD0.mat differ diff --git a/graph/9/20140327/瀹归噺/mLoadCurrent.mat b/graph/9/20140327/瀹归噺/mLoadCurrent.mat new file mode 100644 index 0000000..c6536f7 Binary files /dev/null and b/graph/9/20140327/瀹归噺/mLoadCurrent.mat differ diff --git a/graph/9/20140327/瀹归噺/mVolt.mat b/graph/9/20140327/瀹归噺/mVolt.mat new file mode 100644 index 0000000..afe98a8 Binary files /dev/null and b/graph/9/20140327/瀹归噺/mVolt.mat differ diff --git a/ipopt.opt b/ipopt.opt new file mode 100644 index 0000000..1575861 --- /dev/null +++ b/ipopt.opt @@ -0,0 +1,2 @@ +linear_solver ma57 + diff --git a/mLoadCurrent.mat b/mLoadCurrent.mat index 602824d..0af71b5 100644 Binary files a/mLoadCurrent.mat and b/mLoadCurrent.mat differ diff --git a/mVolt.mat b/mVolt.mat index b2562f5..acd16c3 100644 Binary files a/mVolt.mat and b/mVolt.mat differ diff --git a/mVolt2.mat b/mVolt2.mat new file mode 100644 index 0000000..4b4ee77 Binary files /dev/null and b/mVolt2.mat differ diff --git a/mVolt3.mat b/mVolt3.mat new file mode 100644 index 0000000..886a44a Binary files /dev/null and b/mVolt3.mat differ diff --git a/maxDev-use.mat b/maxDev-use.mat new file mode 100644 index 0000000..1db6791 Binary files /dev/null and b/maxDev-use.mat differ diff --git a/maxDev.mat b/maxDev.mat new file mode 100644 index 0000000..2e9c6b3 Binary files /dev/null and b/maxDev.mat differ diff --git a/plotError.asv b/plotError.asv new file mode 100644 index 0000000..5b8ca75 --- /dev/null +++ b/plotError.asv @@ -0,0 +1,38 @@ +function [ output_args ] = plotError( SEVolt,SEVAngle,rVolt,rVAngle,mVolt,PD,PD0,rPD,QD,QD0,rQD ) + +subplot(4,1,1); +x=1:length(SEVolt); +plot(x,SEVolt); +hold on +plot(x,rVolt,'r-'); +plot(x,mVolt,'g-'); +title('电压') +legend('SE','Actual','Measurement') +%画负荷的标志 +t +plot( +subplot(4,1,2); +plot(x,SEVAngle); +hold on +plot(x,rVAngle,'r-'); +title('相角') +legend('SE','Actual') +x=1:length(PD); +%% PD +subplot(4,1,3); +plot(x,PD); +hold on +plot(x,rPD,'r-'); +plot(x,PD0,'g-'); +legend('SE','Actual','Measurement') +title('有功负荷') +%% QD +subplot(4,1,4); +plot(x,QD); +hold on +plot(x,rQD,'r-'); +plot(x,QD0,'g-'); +legend('SE','Actual','Measurement') +title('无功负荷') +end + diff --git a/plotError.m b/plotError.m new file mode 100644 index 0000000..cef2153 --- /dev/null +++ b/plotError.m @@ -0,0 +1,39 @@ +function [ output_args ] = plotError( SEVolt,SEVAngle,rVolt,rVAngle,mVolt,PD,PD0,rPD,QD,QD0,rQD,PDi ) + +subplot(4,1,1); +x=1:length(SEVolt); +plot(x,SEVolt); +hold on +plot(x,rVolt,'r-'); +plot(x,mVolt,'g-'); +title('电压') +legend('SE','Actual','Measurement') +%画负荷的标志 +% t=sparse(length(rVolt),1); +% t(PDi)=.01; +% bar(1:length(t),t); +subplot(4,1,2); +plot(x,SEVAngle); +hold on +plot(x,rVAngle,'r-'); +title('相角') +legend('SE','Actual') +x=1:length(PD); +%% PD +subplot(4,1,3); +plot(x,PD); +hold on +plot(x,rPD,'r-'); +plot(x,PD0,'g-'); +legend('SE','Actual','Measurement') +title('有功负荷') +%% QD +subplot(4,1,4); +plot(x,QD); +hold on +plot(x,rQD,'r-'); +plot(x,QD0,'g-'); +legend('SE','Actual','Measurement') +title('无功负荷') +end + diff --git a/rVa.mat b/rVa.mat new file mode 100644 index 0000000..8237501 Binary files /dev/null and b/rVa.mat differ diff --git a/statDev-use.mat b/statDev-use.mat new file mode 100644 index 0000000..4e3d41e Binary files /dev/null and b/statDev-use.mat differ diff --git a/statDevPlot.m b/statDevPlot.m new file mode 100644 index 0000000..67be5b0 --- /dev/null +++ b/statDevPlot.m @@ -0,0 +1,11 @@ +x=0.1/200*[1:200]; +plot(x,statDev,'k.') +% p1 = 38.19 (-4.054, 80.43) +% p2 = -13.89 (-20.34, -7.431) +% p3 = 1.562 (1.283, 1.842) +% p4 = -0.0006966 (-0.00395, 0.002557) +y=38.19*x.^3-13.89*x.^2+1.562*x.^1-0.0006966; +hold on +plot(x,y,'k'); +xlabel('sigma'); +ylabel('统计误差'); \ No newline at end of file diff --git a/test.m b/test.m new file mode 100644 index 0000000..211a28a --- /dev/null +++ b/test.m @@ -0,0 +1,4 @@ +for II=1:200 + Run_YALMIP2 +end + diff --git a/thesis/DifferentMeasurement.asv b/thesis/DifferentMeasurement.asv new file mode 100644 index 0000000..155e0ae --- /dev/null +++ b/thesis/DifferentMeasurement.asv @@ -0,0 +1,14 @@ +clc +clear +percent=[0 10 20 30 40 50 60 70 80 90 100]; +statDeviation=[0.003651 0.058995 0.0432499 0.048360 0.041104 0.036334 0.028265 0.013192 0.017754 0.001934 0.00077827]; +maxDeviation=[0.11334 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.122604 0.12984]; +subplot(2,1,1); +plot(percent,statDeviation); +ylabel('统计误差(JS)'); +xlabel('负荷实时数据可知情况/%'); +subplot(2,1,2); +plot(percent,maxDeviation); +ylabel('最大偏差(JM)/%'); +xlabel('负荷实时数据可知情况/%'); +axis([0,100,0,0.22]); \ No newline at end of file diff --git a/thesis/DifferentMeasurement.m b/thesis/DifferentMeasurement.m new file mode 100644 index 0000000..e1f7f46 --- /dev/null +++ b/thesis/DifferentMeasurement.m @@ -0,0 +1,15 @@ +clc +clear +percent=[0 10 20 30 40 50 60 70 80 90 100]; +statDeviation=[0.003651 0.058995 0.0432499 0.048360 0.041104 0.036334 0.028265 0.013192 0.017754 0.001934 0.00077827]; +maxDeviation=[0.11334 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.045225 0.02934]; +subplot(2,1,1); +plot(percent,statDeviation,'k'); +ylabel('统计误差(JS)'); +xlabel('负荷实时数据可知情况/%'); +axis([0,100,0,0.065]); +subplot(2,1,2); +plot(percent,maxDeviation,'k'); +ylabel('最大偏差(JM)/%'); +xlabel('负荷实时数据可知情况/%'); +axis([0,100,0,0.22]); \ No newline at end of file