Baixe o app para aproveitar ainda mais
Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original
lab2_q1_246796_230340.m % UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL % ESCOLA DE ENGENHARIA % DEPARTAMENTO DE ENGENHARIA ELÉTRICA % ENG04006 - SISTEMAS E SINAIS % % Laboratório 2 % % Alunos: Alisson Claudino de Jesus (246796) e Bernardo Brandão Pandolfo (230340) % Turma: C % % QUESTÃO 1: SOLUÇÃO DE EQUAÇÕES DIFERENCIAIS % % Considere um sistema de segunda ordem representado pela seguinte % equação diferencial: % % y"(t)+4y'(t)+25y(t)=25x(t) (1) % % (a) Calcule a resposta natural do sistema (com coeficientes reais), % considerando as condições iniciais % % y(0)=1 e y'(0)=3. % % (b) Calcule a resposta forçada do sistema (com coeficientes reais), para % um sinal de entrada x(t)=u(t), ou seja, um degrau unitário, iniciando em % t=0. % % (c) Utilizando um arquivo lote (.m) apresente, em mesma figura, os % gráficos da resposta natural, resposta forçada e resposta completa % (yc(t)=yn(t)+yf(t)) do sistema. Considere 0<=t<=3s. % % (d) Implemente em um arquivo Simulink a equação diferencial (1) usando % blocos somadores, integradores e outros blocos básicos, e simule as três % respostas calculadas anteriormente (natural, forçada e completa). Compare % com o resultado obtido nos itens anteriores. % % (e) Obtenha a resposta ao impulso deste sistema, através do cálculo da % derivada da resposta ao degrau unitário, considerando condições iniciais % nulas. A partir da resposta ao impulso obtida, avalie: % (a) a estabilidade BIBO usando a difinição: integral de -infinito à % +infinito de |h(t)|dt; % (b) a causalidade do sistema; % (c) a variância no tempo do sistema; % (d) se o sistema tem memória. % Conclusões: % Verificou-se que as respostas calculadas analiticamente e as respostas % fornecidas pelo simulink são equivalentes. Assim como verificou-se que o % sistema é BIBO estável, invariante no tempo, causal e com memória. A % partir do simulink é possível obter as diferentes respostas do sistema de % forma mais intuitiva. clear all; %limpa todas as variáveis close all; %fecha todas as janelas % Questão 01 % a) % Para a resposta natural devemos considerar a entrada nula (x(t)=0). Assim a equação diferencial fica: % y”(t) + 4y’(t) + 25y(t)=0 (1) % Escrevendo a equação característica de (1) tem-se que: % r^2 + 4r + 25=0 (2) % De tal modo que suas raízes são: % r_1= -2+sqrt(-21) % r_2= -2-sqrt(-21) % Como são raízes complexas a resposta natural será da seguinte forma: % yn(t)= exp(-2*t)*(A*sin(sqrt(21)*t)+B*cos(sqrt(21)*t)) (3) % Onde A e B são constantes a serem determinadas pelas condições iniciais. % Aplicando as condições iniciais em (3), tem-se o seguinte sistema: % 1=B % 3= -2B + A*sqrt(21) A= 5/sqrt(21) % Assim, % yn(t)= exp(-2*t)*[(5/sqrt(21))*sin(sqrt(21)*t) + cos(sqrt(21)*t)] (4) % % b) % A resposta forçada é composta pela resposta natural forçada e pela resposta particular. % A resposta natural forçada possui o mesmo formato da resposta natural, mas com constantes diferentes, % uma vez que estas são determinadas para condições iniciais nulas. Assim, % ynf(t)= exp(-2*t)*(C*sin(sqrt(21)*t)+D*cos(sqrt(21)*t)) (5) % Já para a resposta particular, supõe-se uma solução que possua a mesma forma geral da entrada. % Assim, supomos uma yp(t)= E*u(t). Substituindo-a na equação diferencial original, tem-se que: % 25*E=25 E=1 % De tal forma que, % yf(t)= (E + exp(-2*t)*(C*sin(sqrt(21)*t)+D*cos(sqrt(21)*t)))*u(t) (6) % Aplicando as condições iniciais nulas, % D= -1 % 0= -2*D + C*sqrt(21) C=-2/sqrt(21) % Logo a resposta forçada para x=u(t) é % yf(t)= (1 + exp(-2*t)*(( -2/sqrt(21))*sin(sqrt(21)*t) - cos(sqrt(21)*t)))*u(t) (7) % % c) % A resposta completa é a soma da resposta natural e da resposta forçada, % assim % yc(t)= (1 + exp(-2*t)*(sqrt(21)/7*sin(sqrt(21)*t)))*u(t) t=[0:0.01:3]; %criando um vetor tempo yn= exp(-2*t).*[(5/sqrt(21))*sin(sqrt(21)*t) + cos(sqrt(21)*t)]; %definindo a resposta natural yf= (1 + exp(-2*t).*(( -2/sqrt(21))*sin(sqrt(21)*t) - cos(sqrt(21)*t))); %definindo a resposta forçada yc= yn + yf; %definindo a resposta completa figure(1); %abre a janela de figura 1 plot(t,yn,'k',t,yf,'g',t,yc,'b'); %plota continuamente yn, yf e yc grid; %insere uma grade no gráfico legend('Resposta Natural','Resposta Forçada','Resposta Completa'); %insere legenda no gráfico title('Respostas do Sistema'); %insere título no gráfico xlabel('t'); %nomeia o eixo das abscissas %d) figure(2); %abre a janela de figura 2 x=0; %define o valor de entrada x utilizado no simulink y0=1; %define o valor da condiçâo inicial para y quando t é igual a zero para o bloco integrador utilizado no simulink dy0=3; %define o valor da condiçâo inicial para a derivada de y para t igual a zero do bloco integrador utilizado no simulink sim('lab2_q1_alisson_bernardo'); %roda o diagrama de blocos criado no simulink plot(y(:,1),y(:,2),'k'); hold on; x=1; %define o valor de entrada x utilizado no simulink y0=0; %define o valor da condiçâo inicial para y quando t é igual a zero para o bloco integrador utilizado no simulink dy0=0; %define o valor da condiçâo inicial para a derivada de y para t igual a zero do bloco integrador utilizado no simulink sim('lab2_q1_alisson_bernardo'); %roda o diagrama de blocos criado no simulink plot(y(:,1),y(:,2),'g'); hold on; x=1; %define o valor de entrada x utilizado no simulink y0=1; %define o valor da condiçâo inicial para y quando t é igual a zero para o bloco integrador utilizado no simulink dy0=3; %define o valor da condiçâo inicial para a derivada de y para t igual a zero do bloco integrador utilizado no simulink sim('lab2_q1_alisson_bernardo'); %roda o diagrama de blocos criado no simulink plot(y(:,1),y(:,2),'b') legend('Resposta Natural','Resposta Forçada','Resposta Completa'); %insere legendas no gráfico title('Respostas do diagrama de blocos'); %insere um título no gráfico grid on; %insere uma grade de visualização no gráfico % e) % Derivando a resposta forçada obteve-se a resposta ao impulso do sistema: % % h(t)= (25/sqrt(21))*exp(-2t)*sin(sqrt(21)t)*u(t) (8) % % a) Avaliando a estabilidade BIBO através da definição por integral, vemos que o sistema é BIBO estável. % Uma vez que o |sin(sqrt(21)t)| é limitado entre 0 e 1, só resta analisar se a integral de 0 a +infinito do |exp(-2t)| % também é limitada. Ao realizar a integral observa-se que seu resultado é 1/2. % b) Se o sistema for causal, então h(tau)= 0, para tau<0, visto que a função impulso % só assume valores diferentes de zero a partir de zero, o sistema é causal. % c) Se um sinal atrasado de t0 for usado como entrada num sistema invariante no tempo, % então ele produz uma saída atrasada de t0 no tempo. Se aplicarmos um x(t) igual a uma função impulso, % vê-se que a saída é h(t), se depois aplicarmos uma função impulso deslocada de t0, vê-se que a saída é h(t-t0), % de modo que o sistema é invariante. % d) Se um sistema não possui memória então h(tau)=o para todo tau/=0. % Vê-se que isso não é verdade para o sistema em questão, uma vez que h assume valores diferentes de zero, % para diversos pontos diferentes de zero. Logo o sistema possui memória. h= (25/sqrt(21))*exp(-2*t).*sin(sqrt(21)*t); figure(3); %abre a janela de figura 3 plot(t,h,'b'); %plota continuamente h grid; %insere uma grade no gráfico title('Resposta ao Impulso'); %insere título no gráfico xlabel('t'); %nomeia o eixo das abscissas lab2_q1_alisson_bernardo.mdl Model { Name "lab2_q1_alisson_bernardo" Version 8.5 MdlSubVersion 0 SavedCharacterEncoding "windows-1252" GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.5" NumModelReferences 0 NumTestPointedSignals 0 } slprops.hdlmdlprops { $PropName "HDLParams" $ObjectID 1 Array { Type "Cell" Dimension 2 Cell "HDLSubsystem" Cell "Lab2_q1_alisson_bernardo" PropName "mdlProps" } } ScopeRefreshTime 0.035000 OverrideScopeRefreshTime off DisableAllScopes off DataTypeOverride "UseLocalSettings" DataTypeOverrideAppliesTo "AllNumericTypes" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" FPTRunName "Run 1" MaxMDLFileLineLength 120 Object { $PropName "BdWindowsInfo" $ObjectID 2 $ClassName "Simulink.BDWindowsInfo" Object { $PropName "WindowsInfo" $ObjectID 3 $ClassName "Simulink.WindowInfo" IsActive [1] Location [-4.0, 0.0, 1374.0, 776.0] Object { $PropName "ModelBrowserInfo" $ObjectID 4 $ClassName "Simulink.ModelBrowserInfo" Visible [1] DockPosition "Left" Width [50] Height [50] Filter [9] } Object { $PropName "ExplorerBarInfo" $ObjectID 5 $ClassName "Simulink.ExplorerBarInfo" Visible [1] } Object { $PropName "EditorsInfo" $ObjectID 6 $ClassName "Simulink.EditorInfo" IsActive [1] ViewObjType "SimulinkTopLevel" LoadSaveID "0" Extents [1131.0, 602.0] ZoomFactor [1.0] Offset [-143.0187564533345, -82.225000053644408] } } } Created "Fri Apr 01 05:53:43 2016" Creator "ALUNO" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%<Auto>" LastModifiedBy "Aluno" ModifiedDateFormat "%<Auto>" LastModifiedDate "Fri Apr 08 10:07:55 2016" RTWModifiedTimeStamp 381977663 ModelVersionFormat "1.%<AutoIncrement:5>" ConfigurationManager "none" SampleTimeColors off SampleTimeAnnotations off LibraryLinkDisplay "disabled" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowDesignRanges off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowSignalResolutionIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on ShowMarkup on BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off SimulationMode "normal" PauseTimes "5" NumberOfSteps 1 SnapshotBufferSize 10 SnapshotInterval 10 NumberOfLastSnapshots 0 LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off Object { $PropName "DataLoggingOverride" $ObjectID 7 $ClassName "Simulink.SimulationData.ModelLoggingInfo" model_ "Lab2_q2_alisson_bernardo" overrideMode_ [0U] Array { Type "Cell" Dimension 1 Cell "Lab2_q2_alisson_bernardo" PropName "logAsSpecifiedByModels_" } Array { Type "Cell" Dimension 1 Cell [] PropName "logAsSpecifiedByModelsSSIDs_" } } RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on CovForceBlockReductionOff on CovEnableCumulative on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on CovModelRefEnable "Off" CovExternalEMLEnable off CovSFcnEnable on CovBoundaryAbsTol 0.000010 CovBoundaryRelTol 0.010000 CovUseTimeInterval off CovStartTime 0 CovStopTime 0 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 ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 8 Version "1.15.0" Array { Type "Handle" Dimension 9 Simulink.SolverCC { $ObjectID 9 Version "1.15.0" StartTime "0.0" StopTime "3" AbsTol "auto" FixedStep "0.01" 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" EnableConcurrentExecution off ConcurrentTasks off Solver "ode3" SolverName "ode3" SolverJacobianMethodControl "auto" ShapePreserveControl "DisableAll" ZeroCrossControl "UseLocalSettings" ZeroCrossAlgorithm "Nonadaptive" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" InsertRTBMode "Whenever possible" } Simulink.DataIOCC { $ObjectID 10 Version "1.15.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveCompleteFinalSimState off SaveFormat "Array" SignalLoggingSaveFormat "Dataset" SaveOutput on SaveState off SignalLogging on DSMLogging on InspectSignalLogs off VisualizeSimOutput on SaveTime on ReturnWorkspaceOutputs off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" DSMLoggingName "dsmout" OutputOption "RefineOutputTimes" OutputTimes "[]" ReturnWorkspaceOutputsName "out" Refine "1" } Simulink.OptimizationCC { $ObjectID 11 Version "1.15.0" Array { Type "Cell" Dimension 8 Cell "BooleansAsBitfields" Cell "PassReuseOutputArgsAs" Cell "PassReuseOutputArgsThreshold" Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "OptimizeModelRefInitCode" Cell "NoFixptDivByZeroProtection" Cell "UseSpecifiedMinMax" PropName "DisabledProps" } BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off UseDivisionForNetSlopeComputation "off" UseFloatMulNetSlope off DefaultUnderspecifiedDataType "double" UseSpecifiedMinMax off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnhancedBackFolding off CachingGlobalReferences off GlobalBufferReuse on StrengthReduction off ExpressionFolding on BooleansAsBitfields off BitfieldContainerType "uint_T" EnableMemcpy on MemcpyThreshold 64 PassReuseOutputArgsAs "Structure reference" PassReuseOutputArgsThreshold 12 ExpressionDepthLimit 2147483647 LocalBlockOutputs on RollThreshold 5 StateBitsets off DataBitsets off ActiveStateOutputEnumStorageType "Native Integer" 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 12 Version "1.15.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" MaskedZcDiagnostic "warning" IgnoredZcDiagnostic "warning" 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 "EnableAllAsError" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" FrameProcessingCompatibilityMsg "error" UniqueDataStoreMsg "none" BusObjectLabelMismatch "warning" RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" ModelReferenceIOMsg "none" ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StateNameClashWarn "warning" SimStateInterfaceChecksumMismatchMsg "warning" SimStateOlderReleaseMsg "error" InitInArrayFormatMsg "warning" StrictBusMsg "ErrorLevel1" BusNameAdapt "WarnAndRepair" NonBusSignalsTreatedAsBus "none" BlockIODiagnostic "none" SFUnusedDataAndEventsDiag "warning" SFUnexpectedBacktrackingDiag "warning" SFInvalidInputDataAccessInChartInitDiag "warning" SFNoUnconditionalDefaultTransitionDiag "warning" SFTransitionOutsideNaturalParentDiag "warning" SFUnconditionalTransitionShadowingDiag "warning" SFUndirectedBroadcastEventsDiag "warning" SFTransitionActionBeforeConditionDiag "warning" SFOutputUsedAsStateInMooreChartDiag "error" IntegerSaturationMsg "warning" } Simulink.HardwareCC { $ObjectID 13 Version "1.15.0" ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 32 ProdBitPerLong 32 ProdBitPerLongLong 64 ProdBitPerFloat 32 ProdBitPerDouble 64 ProdBitPerPointer 32 ProdLargestAtomicInteger "Char" ProdLargestAtomicFloat "None" ProdIntDivRoundTo "Undefined" ProdEndianess "Unspecified" ProdWordSize 32 ProdShiftRightIntArith on ProdLongLongMode off ProdHWDeviceType "32-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetBitPerLongLong 64 TargetBitPerFloat 32 TargetBitPerDouble 64 TargetBitPerPointer 32 TargetLargestAtomicInteger "Char" TargetLargestAtomicFloat "None" TargetShiftRightIntArith on TargetLongLongMode off TargetIntDivRoundTo "Undefined" TargetEndianess "Unspecified" TargetWordSize 32 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "Specified" TargetUnknown off ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 14 Version "1.15.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" EnableParallelModelReferenceBuilds off ParallelModelReferenceErrorOnInvalidPool on ParallelModelReferenceMATLABWorkerInit "None" ModelReferenceNumInstancesAllowed "Multi" PropagateVarSize "Infer from blocks in model" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off PropagateSignalLabelsOutOfModel off SupportModelReferenceSimTargetCustomCode off } Simulink.SFSimCC { $ObjectID 15 Version "1.15.0" SFSimOverflowDetection on SFSimEcho on SimCtrlC on SimIntegrity on SimUseLocalCustomCode off SimParseCustomCode on SimBuildMode "sf_incremental_build" SimGenImportedTypeDefs off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 16 Version "1.15.0" Array { Type "Cell" Dimension 15 Cell "IncludeHyperlinkInReport" Cell "GenerateTraceInfo" Cell "GenerateTraceReport" Cell "GenerateTraceReportSl" Cell "GenerateTraceReportSf" Cell "GenerateTraceReportEml" Cell "PortableWordSizes" Cell "GenerateWebview" Cell "GenerateCodeMetricsReport" Cell "GenerateCodeReplacementReport" Cell "GenerateErtSFunction" Cell "CreateSILPILBlock" Cell "CodeExecutionProfiling" Cell "CodeProfilingSaveOptions" Cell "CodeProfilingInstrumentation" PropName "DisabledProps" } SystemTargetFile "grt.tlc" TLCOptions "" GenCodeOnly off MakeCommand "make_rtw" GenerateMakefile on PackageGeneratedCodeAndArtifacts off PackageName "" TemplateMakefile "grt_default_tmf" PostCodeGenCommand "" Description "" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off RTWUseLocalCustomCode off RTWUseSimCustomCode off CustomSourceCode "" CustomHeaderCode "" CustomInclude "" CustomSource "" CustomLibrary "" CustomInitializer "" CustomTerminator "" Toolchain "Automatically locate an installed toolchain" BuildConfiguration "Faster Builds" IncludeHyperlinkInReport off LaunchReport off PortableWordSizes off CreateSILPILBlock "None" CodeExecutionProfiling off CodeExecutionProfileVariable "executionProfile" CodeProfilingSaveOptions "SummaryOnly" CodeProfilingInstrumentation off SILDebugging off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off GenerateTraceInfo off GenerateTraceReport off GenerateTraceReportSl off GenerateTraceReportSf off GenerateTraceReportEml off GenerateWebview off GenerateCodeMetricsReport off GenerateCodeReplacementReport off GenerateMissedCodeReplacementReport off RTWCompilerOptimization "off" RTWCustomCompilerOptimizations "" CheckMdlBeforeBuild "Off" SharedConstantsCachingThreshold 1024 Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 17 Version "1.15.0" Array { Type "Cell" Dimension 22 Cell "IgnoreCustomStorageClasses" Cell "IgnoreTestpoints" Cell "InsertBlockDesc" Cell "InsertPolySpaceComments" Cell "SFDataObjDesc" Cell "MATLABFcnDesc" Cell "SimulinkDataObjDesc" Cell "DefineNamingRule" Cell "SignalNamingRule" Cell "ParamNamingRule" Cell "InternalIdentifier" 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 CommentStyle "Auto" IgnoreCustomStorageClasses on IgnoreTestpoints off IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off OperatorAnnotations off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off MATLABFcnDesc off IncDataTypeInIds off MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M_T" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrFcnArg "rt$I$N$M" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" CustomSymbolStrUtil "$N$C" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off InsertPolySpaceComments off SimulinkBlockComments on MATLABSourceComments off EnableCustomComments off InternalIdentifier "Shortened" InlinedPrmAccess "Literals" ReqsInCode off UseSimReservedNames off } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 18 Version "1.15.0" Array { Type "Cell" Dimension 14 Cell "GeneratePreprocessorConditionals" Cell "IncludeMdlTerminateFcn" Cell "GenerateAllocFcn" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "ModelStepFunctionPrototypeControlCompliant" Cell "CPPClassGenCompliant" Cell "SupportNonInlinedSFcns" Cell "PurelyIntegerCode" Cell "SupportComplex" Cell "SupportAbsoluteTime" Cell "SupportContinuousTime" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "NOT IN USE" TargetLangStandard "C89/C90 (ANSI)" CodeReplacementLibrary "None" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on InferredTypesCompatibility off GenerateSampleERTMain off GenerateTestInterfaces off ModelReferenceCompliant on ParMdlRefBuildCompliant on CompOptLevelCompliant on ConcurrentExecutionCompliant on IncludeMdlTerminateFcn on GeneratePreprocessorConditionals "Disable all" CombineOutputUpdateFcns on CombineSignalStateStructs off SuppressErrorStatus off ERTFirstTimeCompliant off IncludeFileDelimiter "Auto" ERTCustomFileBanners off SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging on MultiInstanceERTCode off CodeInterfacePackaging "Nonreusable function" SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime on SupportNonInlinedSFcns on SupportVariableSizeSignals off ParenthesesLevel "Nominal" CastingMode "Nominal" MATLABClassNameForMDSCustomization "Simulink.SoftwareTarget.GRTCustomization" ModelStepFunctionPrototypeControlCompliant off CPPClassGenCompliant on AutosarCompliant off GRTInterface off GenerateAllocFcn off GenerateSharedConstants on UseMalloc off ExtMode off ExtModeStaticAlloc off ExtModeTesting off ExtModeStaticAllocSize 1000000 ExtModeTransport 0 ExtModeMexFile "ext_comm" ExtModeIntrfLevel "Level1" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off RTWCAPIRootIO off GenerateASAP2 off MultiInstanceErrorCode "Error" } PropName "Components" } } hdlcoderui.hdlcc { $ObjectID 19 Version "1.15.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 [ 220, 78, 1146, 628 ] } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 8 } Object { $PropName "DataTransfer" $ObjectID 20 $ClassName "Simulink.GlobalDataTransfer" DefaultTransitionBetweenSyncTasks "Ensure deterministic transfer (maximum delay)" DefaultTransitionBetweenAsyncTasks "Ensure data integrity only" DefaultTransitionBetweenContTasks "Ensure deterministic transfer (minimum delay)" DefaultExtrapolationMethodBetweenContTasks "None" AutoInsertRateTranBlk [0] } ExplicitPartitioning off 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" } MaskDefaults { SelfModifiable "off" IconFrame "on" IconOpaque "on" RunInitForIconRedraw "off" IconRotate "none" PortRotate "default" IconUnits "autoscale" } MaskParameterDefaults { Evaluate "on" Tunable "on" NeverSave "off" Internal "off" ReadOnly "off" Enabled "on" Visible "on" ToolTip "on" } BlockParameterDefaults { Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParamMin "[]" ParamMax "[]" ParamDataTypeStr "Inherit: Same as input" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Integrator ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" WrapState off WrappedStateUpperValue "pi" WrappedStateLowerValue "-pi" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" IgnoreLimit off ZeroCross on ContinuousStateAttributes "''" } Block { BlockType Scope ModelBased off TickLabels "OneTimeTick" ZoomMode "on" Grid "on" ShowLegends off TimeRange "auto" YMin "-5" YMax "5" SaveToWorkspace off SaveName "ScopeData" DataFormat "Array" LimitDataPoints on MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "-1" ScrollMode off } Block { BlockType Step Time "1" Before "0" After "1" SampleTime "-1" VectorParams1D on ZeroCross on } Block { BlockType Sum IconShape "rectangular" Inputs "++" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on AccumDataTypeStr "Inherit: Inherit via internal rule" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } } System { Name "lab2_q1_alisson_bernardo" Location [-4, 0, 1370, 776] Open on ModelBrowserVisibility on ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" ReportName "simulink-default.rpt" SIDHighWatermark "15" Block { BlockType Gain Name "Gain" SID "5" Position [325, 225, 365, 265] ZOrder 5 BlockMirror on Gain "25" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain1" SID "6" Position [240, 82, 285, 118] ZOrder 6 BlockMirror on Gain "4" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain2" SID "12" Position [110, 152, 155, 188] ZOrder 12 Gain "25" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "Integrator" SID "1" Ports [1, 1] Position [285, 152, 325, 188] ZOrder 1 InitialCondition "dy0" } Block { BlockType Integrator Name "Integrator1" SID "2" Ports [1, 1] Position [425, 152, 460, 188] ZOrder 2 InitialCondition "y0" } Block { BlockType Scope Name "Scope" SID "10" Ports [1] Position [560, 151, 595, 189] ZOrder 10 Floating off Location [10, 69, 1376, 780] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%<SignalLabel>" } List { ListType ScopeGraphics FigureColor "[0.501960784313725 0.501960784313725 0.501960784313725]" AxesColor "[0 0 0]" AxesTickColor "[1 1 1]" LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" LineStyles "-|-|-|-|-|-" LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" MarkerStyles "none|none|none|none|none|none" } SaveToWorkspace on SaveName "y" LimitDataPoints off SampleInput on SampleTime "0.01" } Block { BlockType Step Name "Step" SID "13" Position [20, 150, 65, 190] ZOrder 13 Time "0" After "x" SampleTime "0" } Block { BlockType Sum Name "Sum" SID "7" Ports [3, 1] Position [200, 155, 230, 185] ZOrder 7 ShowName off IconShape "round" Inputs "-+-" InputSameDT off OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Line { ZOrder 1 SrcBlock "Sum" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { ZOrder 2 SrcBlock "Integrator1" SrcPort 1 Points [36, 0] Branch { ZOrder 17 DstBlock "Scope" DstPort 1 } Branch { ZOrder 4 Points [0, 75] DstBlock "Gain" DstPort 1 } } Line { ZOrder 5 SrcBlock "Integrator" SrcPort 1 Points [40, 0] Branch { ZOrder 16 Points [0, -70] DstBlock "Gain1" DstPort 1 } Branch { ZOrder 6 DstBlock "Integrator1" DstPort 1 } } Line { ZOrder 11 SrcBlock "Step" SrcPort 1 DstBlock "Gain2" DstPort 1 } Line { ZOrder 12 SrcBlock "Gain" SrcPort 1 Points [-105, 0] DstBlock "Sum" DstPort 3 } Line { ZOrder 13 SrcBlock "Gain2" SrcPort 1 DstBlock "Sum" DstPort 2 } Line { ZOrder 14 SrcBlock "Gain1" SrcPort 1 Points [-20, 0] DstBlock "Sum" DstPort 1 } } } lab2_q2_246796_230340.m % UNIVERSIDADE FEDERAL DO RIO GRANDE DO SUL % ESCOLA DE ENGENHARIA % DEPARTAMENTO DE ENGENHARIA ELÉTRICA % ENG04006 - SISTEMAS E SINAIS % % LABORATÓRIO 02 - SISTEMAS E SINAIS (ENG04006) 2016/1 % % Alunos: Alisson Claudino de Jesus (246796) e Bernardo Brandão Pandolfo (230340) % Turma: C % % QUESTÃO 2: REPRESENTAÇÃO NO ESPAÇO DE ESTADOS % % a)Obtenha a representação em espaço de estados do sistema apresentado em % (1) considerendo q1(t)=y(t) e q2(t)=y'(t). % % b)A partir da representação em estados de estados obtida, implemente um % diagrama de blocos e simule o sistema de forma a obter as três respostas % obtidas no item anterior. Use as mesmas condições iniciais e o mesmo sinal % de entrada. % % c)Apresente as respostas obtidas (comparando com as respostas obtidas % anteriormente) e apresente também o comportamento dos estados do sistema. % % Conclusões: % Verificou-se que as respostas calculadas anteriormente e as respostas % fornecidas pelo simulink através do diagrama de blocos obtido da % representação no espaço de estados são equivalentes. Assim como aquelas % que foram fornecidas pelo diagrama de blocos anterior. clear all; %limpa todas as variáveis close all; %fecha todas as janelas % a) % q1= y % q2= y' % dq1/dt = q2 % dq2/dt = - 25q1 -4q2 + 25x % y = q1 % A = [ 0 1 ; -25 -4 ] % B = [ 0 ; 25 ] % C = [ 1 0 ] % D = [ 0 ] %b) e c) t=0:0.01:3; %criando um vetor tempo x=0; %define o valor de entrada x utilizado no simulink y0=1; %define o valor da condiçâo inicial para y quando t é igual a zero para o bloco integrador utilizado no simulink dy0=3; %define o valor da condiçâo inicial para a derivada de y para t igual a zero do bloco integrador utilizado no simulink sim('lab2_q2_alisson_bernardo'); %chama o arquivo do simulink figure(1); %abre janela gráfica número 1 hold on; plot(q1(:,1),q1(:,2)); %plota o yn do ESTADO 1. figure(2); %abre janela gráfica número 2 plot(q2(:,1),q2(:,2)); %plota o yn do ESTADO 2. hold on; x=1; %define o valor de entrada x utilizado no simulink y0=0; %define o valor da condiçâo inicial para y quando t é igual a zero para o bloco integrador utilizado no simulink dy0=0; %define o valor da condiçâo inicial para a derivada de y para t igual a zero do bloco integrador utilizado no simulink sim('lab2_q2_alisson_bernardo') %chama o arquivo do simulink figure(1); hold on; plot(q1(:,1),q1(:,2)); %plota o yf do ESTADO 1. figure(2) plot(q2(:,1),q2(:,2)); %plota o yf do ESTADO 2. hold on; x=1; %define o valor de entrada x utilizado no simulink y0=1; %define o valor da condiçâo inicial para y quando t é igual a zero para o bloco integrador utilizado no simulink dy0=3; %define o valor da condiçâo inicial para a derivada de y para t igual a zero do bloco integrador utilizado no simulink sim('lab2_q2_alisson_bernardo') %chama o arquivo do simulink figure(1); plot(q1(:,1),q1(:,2)); %plota yc do ESTADO 1 grid on; legend('Resposta natural de q1','Resposta forçada de q1','Resposta completa de q1'); %insere legenda nas plotagens title('ESTADO 1') %entitula gráfico xlabel('t') %rotula eixo 'x' como 't' ylabel('q1(t)') %rotula eixo 'y' como 'Q2(t)' figure(2) plot(q2(:,1),q2(:,2)); %plota o yc do ESTADO 2 grid on; %insere grade no gráfico legend('Resposta natural de q2','Resposta forçada de q2','Resposta completa de q2'); title('ESTADO 2') %entitula gráfico xlabel('t') %rotula eixo 'x' como 't' ylabel('q2(t)') %rotula eixo 'y' como 'Q2(t)' %Respostas obtidas manualmente yn= exp(-2*t).*[(5/sqrt(21))*sin(sqrt(21)*t) + cos(sqrt(21)*t)]; %resposta natural yf= (1 + exp(-2*t).*(( -2/sqrt(21))*sin(sqrt(21)*t) - cos(sqrt(21)*t))); %resposta forçada yc= yn + yf; %resposta completa figure(3); %abre a janela de figura 1 plot(t,yn,'k',t,yf,'g',t,yc,'r'); %plota continuamente yn, yf e yc grid; %insere uma grade no gráfico legend('Resposta Natural','Resposta Forçada','Resposta Completa'); %insere legenda no gráfico title('Respostas Anteriores'); %insere título no gráfico xlabel('t'); %nomeia o eixo das abscissas grid on; lab2_q2_alisson_bernardo.mdl Model { Name "lab2_q2_alisson_bernardo" Version 8.5 MdlSubVersion 0 SavedCharacterEncoding "windows-1252" GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.7" NumModelReferences 0 NumTestPointedSignals 0 } slprops.hdlmdlprops { $PropName "HDLParams" $ObjectID 1 Array { Type "Cell" Dimension 2 Cell "HDLSubsystem" Cell "Lab2_q2_alisson_bernardo" PropName "mdlProps" } } ScopeRefreshTime 0.035000 OverrideScopeRefreshTime off DisableAllScopes off DataTypeOverride "UseLocalSettings" DataTypeOverrideAppliesTo "AllNumericTypes" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" FPTRunName "Run 1" MaxMDLFileLineLength 120 Object { $PropName "BdWindowsInfo" $ObjectID 2 $ClassName "Simulink.BDWindowsInfo" Object { $PropName "WindowsInfo" $ObjectID 3 $ClassName "Simulink.WindowInfo" IsActive [1] Location [-4.0, 0.0, 1374.0, 776.0] Object { $PropName "ModelBrowserInfo" $ObjectID 4 $ClassName "Simulink.ModelBrowserInfo" Visible [1] DockPosition "Left" Width [50] Height [50] Filter [9] } Object { $PropName "ExplorerBarInfo" $ObjectID 5 $ClassName "Simulink.ExplorerBarInfo" Visible [1] } Object { $PropName "EditorsInfo" $ObjectID 6 $ClassName "Simulink.EditorInfo" IsActive [1] ViewObjType "SimulinkTopLevel" LoadSaveID "0" Extents [1131.0, 602.0] ZoomFactor [1.0] Offset [-143.0187564533345, -82.225000053644408] } } } Created "Fri Apr 01 05:53:43 2016" Creator "ALUNO" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%<Auto>" LastModifiedBy "Aluno" ModifiedDateFormat "%<Auto>" LastModifiedDate "Fri Sep 09 09:59:13 2016" RTWModifiedTimeStamp 381978422 ModelVersionFormat "1.%<AutoIncrement:7>" ConfigurationManager "none" SampleTimeColors off SampleTimeAnnotations off LibraryLinkDisplay "disabled" WideLines off ShowLineDimensions off ShowPortDataTypes off ShowDesignRanges off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowSignalResolutionIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on ShowMarkup on BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off SimulationMode "normal" PauseTimes "5" NumberOfSteps 1 SnapshotBufferSize 10 SnapshotInterval 10 NumberOfLastSnapshots 0 LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off Object { $PropName "DataLoggingOverride" $ObjectID 7 $ClassName "Simulink.SimulationData.ModelLoggingInfo" model_ "Lab2_q2_alisson_bernardo" overrideMode_ [0.0] Array { Type "Cell" Dimension 1 Cell "Lab2_q2_alisson_bernardo" PropName "logAsSpecifiedByModels_" } Array { Type "Cell" Dimension 1 Cell [] PropName "logAsSpecifiedByModelsSSIDs_" } } RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on CovForceBlockReductionOff on CovEnableCumulative on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on CovModelRefEnable "Off" CovExternalEMLEnable off CovSFcnEnable on CovBoundaryAbsTol 0.000010 CovBoundaryRelTol 0.010000 CovUseTimeInterval off CovStartTime 0 CovStopTime 0 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 ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 8 Version "1.15.0" Array { Type "Handle" Dimension 9 Simulink.SolverCC { $ObjectID 9 Version "1.15.0" StartTime "0.0" StopTime "3" AbsTol "auto" FixedStep "0.01" 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" EnableConcurrentExecution off ConcurrentTasks off Solver "ode3" SolverName "ode3" SolverJacobianMethodControl "auto" ShapePreserveControl "DisableAll" ZeroCrossControl "UseLocalSettings" ZeroCrossAlgorithm "Nonadaptive" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" InsertRTBMode "Whenever possible" } Simulink.DataIOCC { $ObjectID 10 Version "1.15.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveCompleteFinalSimState off SaveFormat "Array" SignalLoggingSaveFormat "Dataset" SaveOutput on SaveState off SignalLogging on DSMLogging on InspectSignalLogs off VisualizeSimOutput on SaveTime on ReturnWorkspaceOutputs off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" DSMLoggingName "dsmout" OutputOption "RefineOutputTimes" OutputTimes "[]" ReturnWorkspaceOutputsName "out" Refine "1" } Simulink.OptimizationCC { $ObjectID 11 Version "1.15.0" Array { Type "Cell" Dimension 8 Cell "BooleansAsBitfields" Cell "PassReuseOutputArgsAs" Cell "PassReuseOutputArgsThreshold" Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "OptimizeModelRefInitCode" Cell "NoFixptDivByZeroProtection" Cell "UseSpecifiedMinMax" PropName "DisabledProps" } BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off UseDivisionForNetSlopeComputation "off" UseFloatMulNetSlope off DefaultUnderspecifiedDataType "double" UseSpecifiedMinMax off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnhancedBackFolding off CachingGlobalReferences off GlobalBufferReuse on StrengthReduction off ExpressionFolding on BooleansAsBitfields off BitfieldContainerType "uint_T" EnableMemcpy on MemcpyThreshold 64 PassReuseOutputArgsAs "Structure reference" PassReuseOutputArgsThreshold 12 ExpressionDepthLimit 2147483647 LocalBlockOutputs on RollThreshold 5 StateBitsets off DataBitsets off ActiveStateOutputEnumStorageType "Native Integer" 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 12 Version "1.15.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" MaskedZcDiagnostic "warning" IgnoredZcDiagnostic "warning" 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 "EnableAllAsError" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" FrameProcessingCompatibilityMsg "error" UniqueDataStoreMsg "none" BusObjectLabelMismatch "warning" RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" ModelReferenceIOMsg "none" ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StateNameClashWarn "warning" SimStateInterfaceChecksumMismatchMsg "warning" SimStateOlderReleaseMsg "error" InitInArrayFormatMsg "warning" StrictBusMsg "ErrorLevel1" BusNameAdapt "WarnAndRepair" NonBusSignalsTreatedAsBus "none" BlockIODiagnostic "none" SFUnusedDataAndEventsDiag "warning" SFUnexpectedBacktrackingDiag "warning" SFInvalidInputDataAccessInChartInitDiag "warning" SFNoUnconditionalDefaultTransitionDiag "warning" SFTransitionOutsideNaturalParentDiag "warning" SFUnconditionalTransitionShadowingDiag "warning" SFUndirectedBroadcastEventsDiag "warning" SFTransitionActionBeforeConditionDiag "warning" SFOutputUsedAsStateInMooreChartDiag "error" IntegerSaturationMsg "warning" } Simulink.HardwareCC { $ObjectID 13 Version "1.15.0" ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 32 ProdBitPerLong 32 ProdBitPerLongLong 64 ProdBitPerFloat 32 ProdBitPerDouble 64 ProdBitPerPointer 32 ProdLargestAtomicInteger "Char" ProdLargestAtomicFloat "None" ProdIntDivRoundTo "Undefined" ProdEndianess "Unspecified" ProdWordSize 32 ProdShiftRightIntArith on ProdLongLongMode off ProdHWDeviceType "32-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetBitPerLongLong 64 TargetBitPerFloat 32 TargetBitPerDouble 64 TargetBitPerPointer 32 TargetLargestAtomicInteger "Char" TargetLargestAtomicFloat "None" TargetShiftRightIntArith on TargetLongLongMode off TargetIntDivRoundTo "Undefined" TargetEndianess "Unspecified" TargetWordSize 32 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "Specified" TargetUnknown off ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 14 Version "1.15.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" EnableParallelModelReferenceBuilds off ParallelModelReferenceErrorOnInvalidPool on ParallelModelReferenceMATLABWorkerInit "None" ModelReferenceNumInstancesAllowed "Multi" PropagateVarSize "Infer from blocks in model" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off PropagateSignalLabelsOutOfModel off SupportModelReferenceSimTargetCustomCode off } Simulink.SFSimCC { $ObjectID 15 Version "1.15.0" SFSimOverflowDetection on SFSimEcho on SimCtrlC on SimIntegrity on SimUseLocalCustomCode off SimParseCustomCode on SimBuildMode "sf_incremental_build" SimGenImportedTypeDefs off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 16 Version "1.15.0" Array { Type "Cell" Dimension 15 Cell "IncludeHyperlinkInReport" Cell "GenerateTraceInfo" Cell "GenerateTraceReport" Cell "GenerateTraceReportSl" Cell "GenerateTraceReportSf" Cell "GenerateTraceReportEml" Cell "PortableWordSizes" Cell "GenerateWebview" Cell "GenerateCodeMetricsReport" Cell "GenerateCodeReplacementReport" Cell "GenerateErtSFunction" Cell "CreateSILPILBlock" Cell "CodeExecutionProfiling" Cell "CodeProfilingSaveOptions" Cell "CodeProfilingInstrumentation" PropName "DisabledProps" } SystemTargetFile "grt.tlc" TLCOptions "" GenCodeOnly off MakeCommand "make_rtw" GenerateMakefile on PackageGeneratedCodeAndArtifacts off PackageName "" TemplateMakefile "grt_default_tmf" PostCodeGenCommand "" Description "" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off RTWUseLocalCustomCode off RTWUseSimCustomCode off CustomSourceCode "" CustomHeaderCode "" CustomInclude "" CustomSource "" CustomLibrary "" CustomInitializer "" CustomTerminator "" Toolchain "Automatically locate an installed toolchain" BuildConfiguration "Faster Builds" IncludeHyperlinkInReport off LaunchReport off PortableWordSizes off CreateSILPILBlock "None" CodeExecutionProfiling off CodeExecutionProfileVariable "executionProfile" CodeProfilingSaveOptions "SummaryOnly" CodeProfilingInstrumentation off SILDebugging off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off GenerateTraceInfo off GenerateTraceReport off GenerateTraceReportSl off GenerateTraceReportSf off GenerateTraceReportEml off GenerateWebview off GenerateCodeMetricsReport off GenerateCodeReplacementReport off GenerateMissedCodeReplacementReport off RTWCompilerOptimization "off" RTWCustomCompilerOptimizations "" CheckMdlBeforeBuild "Off" SharedConstantsCachingThreshold 1024 Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 17 Version "1.15.0" Array { Type "Cell" Dimension 22 Cell "IgnoreCustomStorageClasses" Cell "IgnoreTestpoints" Cell "InsertBlockDesc" Cell "InsertPolySpaceComments" Cell "SFDataObjDesc" Cell "MATLABFcnDesc" Cell "SimulinkDataObjDesc" Cell "DefineNamingRule" Cell "SignalNamingRule" Cell "ParamNamingRule" Cell "InternalIdentifier" 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 CommentStyle "Auto" IgnoreCustomStorageClasses on IgnoreTestpoints off IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off OperatorAnnotations off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off MATLABFcnDesc off IncDataTypeInIds off MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M_T" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrFcnArg "rt$I$N$M" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" CustomSymbolStrUtil "$N$C" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off InsertPolySpaceComments off SimulinkBlockComments on MATLABSourceComments off EnableCustomComments off InternalIdentifier "Shortened" InlinedPrmAccess "Literals" ReqsInCode off UseSimReservedNames off } Simulink.GRTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 18 Version "1.15.0" Array { Type "Cell" Dimension 14 Cell "GeneratePreprocessorConditionals" Cell "IncludeMdlTerminateFcn" Cell "GenerateAllocFcn" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "ModelStepFunctionPrototypeControlCompliant" Cell "CPPClassGenCompliant" Cell "SupportNonInlinedSFcns" Cell "PurelyIntegerCode" Cell "SupportComplex" Cell "SupportAbsoluteTime" Cell "SupportContinuousTime" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "NOT IN USE" TargetLangStandard "C89/C90 (ANSI)" CodeReplacementLibrary "None" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on InferredTypesCompatibility off GenerateSampleERTMain off GenerateTestInterfaces off ModelReferenceCompliant on ParMdlRefBuildCompliant on CompOptLevelCompliant on ConcurrentExecutionCompliant on IncludeMdlTerminateFcn on GeneratePreprocessorConditionals "Disable all" CombineOutputUpdateFcns on CombineSignalStateStructs off SuppressErrorStatus off ERTFirstTimeCompliant off IncludeFileDelimiter "Auto" ERTCustomFileBanners off SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging on MultiInstanceERTCode off CodeInterfacePackaging "Nonreusable function" SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime on SupportNonInlinedSFcns on SupportVariableSizeSignals off ParenthesesLevel "Nominal" CastingMode "Nominal" MATLABClassNameForMDSCustomization "Simulink.SoftwareTarget.GRTCustomization" ModelStepFunctionPrototypeControlCompliant off CPPClassGenCompliant on AutosarCompliant off GRTInterface off GenerateAllocFcn off GenerateSharedConstants on UseMalloc off ExtMode off ExtModeStaticAlloc off ExtModeTesting off ExtModeStaticAllocSize 1000000 ExtModeTransport 0 ExtModeMexFile "ext_comm" ExtModeIntrfLevel "Level1" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off RTWCAPIRootIO off GenerateASAP2 off MultiInstanceErrorCode "Error" } PropName "Components" } } hdlcoderui.hdlcc { $ObjectID 19 Version "1.15.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 [ 220, 78, 1146, 628 ] } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 8 } Object { $PropName "DataTransfer" $ObjectID 20 $ClassName "Simulink.GlobalDataTransfer" DefaultTransitionBetweenSyncTasks "Ensure deterministic transfer (maximum delay)" DefaultTransitionBetweenAsyncTasks "Ensure data integrity only" DefaultTransitionBetweenContTasks "Ensure deterministic transfer (minimum delay)" DefaultExtrapolationMethodBetweenContTasks "None" AutoInsertRateTranBlk [0] } ExplicitPartitioning off 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" } MaskDefaults { SelfModifiable "off" IconFrame "on" IconOpaque "on" RunInitForIconRedraw "off" IconRotate "none" PortRotate "default" IconUnits "autoscale" } MaskParameterDefaults { Evaluate "on" Tunable "on" NeverSave "off" Internal "off" ReadOnly "off" Enabled "on" Visible "on" ToolTip "on" } BlockParameterDefaults { Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParamMin "[]" ParamMax "[]" ParamDataTypeStr "Inherit: Same as input" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Integrator ExternalReset "none" InitialConditionSource "internal" InitialCondition "0" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" WrapState off WrappedStateUpperValue "pi" WrappedStateLowerValue "-pi" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" IgnoreLimit off ZeroCross on ContinuousStateAttributes "''" } Block { BlockType Scope ModelBased off TickLabels "OneTimeTick" ZoomMode "on" Grid "on" ShowLegends off TimeRange "auto" YMin "-5" YMax "5" SaveToWorkspace off SaveName "ScopeData" DataFormat "Array" LimitDataPoints on MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "-1" ScrollMode off } Block { BlockType Step Time "1" Before "0" After "1" SampleTime "-1" VectorParams1D on ZeroCross on } Block { BlockType Sum IconShape "rectangular" Inputs "++" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on AccumDataTypeStr "Inherit: Inherit via internal rule" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } } System { Name "lab2_q2_alisson_bernardo" Location [-4, 0, 1370, 776] Open on ModelBrowserVisibility on ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" ReportName "simulink-default.rpt" SIDHighWatermark "16" Block { BlockType Scope Name "Estado 1" SID "10" Ports [1] Position [560, 151, 595, 189] ZOrder 10 Floating off Location [10, 69, 1376, 780] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%<SignalLabel>" } List { ListType ScopeGraphics FigureColor "[0.501960784313725 0.501960784313725 0.501960784313725]" AxesColor "[0 0 0]" AxesTickColor "[1 1 1]" LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" LineStyles "-|-|-|-|-|-" LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" MarkerStyles "none|none|none|none|none|none" } SaveToWorkspace on SaveName "q1" LimitDataPoints off SampleInput on SampleTime "0.01" } Block { BlockType Scope Name "Estado 2" SID "16" Ports [1] Position [560, 64, 595, 106] ZOrder 14 Floating off Location [1, 48, 1367, 727] Open off NumInputPorts "1" List { ListType AxesTitles axes1 "%<SignalLabel>" } List { ListType ScopeGraphics FigureColor "[0.5 0.5 0.5]" AxesColor "[0 0 0]" AxesTickColor "[1 1 1]" LineColors "[1 1 0;1 0 1;0 1 1;1 0 0;0 1 0;0 0 1]" LineStyles "-|-|-|-|-|-" LineWidths "[0.5 0.5 0.5 0.5 0.5 0.5]" MarkerStyles "none|none|none|none|none|none" } SaveToWorkspace on SaveName "q2" LimitDataPoints off } Block { BlockType Gain Name "Gain" SID "5" Position [325, 225, 365, 265] ZOrder 5 BlockMirror on Gain "25" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain1" SID "6" Position [240, 67, 285, 103] ZOrder 6 BlockMirror on Gain "4" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain2" SID "12" Position [110, 152, 155, 188] ZOrder 12 Gain "25" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Integrator Name "Integrator" SID "1" Ports [1, 1] Position [285, 152, 325, 188] ZOrder 1 InitialCondition "dy0" } Block { BlockType Integrator Name "Integrator1" SID "2" Ports [1, 1] Position [425, 152, 460, 188] ZOrder 2 InitialCondition "y0" } Block { BlockType Step Name "Step" SID "13" Position [20, 150, 65, 190] ZOrder 13 Time "0" After "x" SampleTime "0" } Block { BlockType Sum Name "Sum" SID "7" Ports [3, 1] Position [200, 155, 230, 185] ZOrder 7 ShowName off IconShape "round" Inputs "-+-" InputSameDT off OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Line { ZOrder 1 SrcBlock "Sum" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { ZOrder 2 SrcBlock "Integrator1" SrcPort 1 Points [36, 0] Branch { ZOrder 17 DstBlock "Estado 1" DstPort 1 } Branch { ZOrder 4 Points [0, 75] DstBlock "Gain" DstPort 1 } } Line { ZOrder 5 SrcBlock "Integrator" SrcPort 1 Points [40, 0] Branch { ZOrder 16 Points [0, -85] Branch { ZOrder 27 DstBlock "Estado 2" DstPort 1 } Branch { ZOrder 26 DstBlock "Gain1" DstPort 1 } } Branch { ZOrder 6 DstBlock "Integrator1" DstPort 1 } } Line { ZOrder 11 SrcBlock "Step" SrcPort 1 DstBlock "Gain2" DstPort 1 } Line { ZOrder 12 SrcBlock "Gain" SrcPort 1 Points [-105, 0] DstBlock "Sum" DstPort 3 } Line { ZOrder 13 SrcBlock "Gain2" SrcPort 1 DstBlock "Sum" DstPort 2 } Line {
Compartilhar