Package evaluation of SymbolicControlSystems on Julia 1.11.3 (d63adeda50*) started at 2025-02-14T06:57:02.382 ################################################################################ # Set-up # Installing PkgEval dependencies (TestEnv)... Set-up completed after 8.36s ################################################################################ # Installation # Installing SymbolicControlSystems... Resolving package versions... Installed Conda ── v1.10.2 Installed PyCall ─ v1.96.4 Updating `~/.julia/environments/v1.11/Project.toml` [886cb795] + SymbolicControlSystems v0.3.0 Updating `~/.julia/environments/v1.11/Manifest.toml` [47edcb42] + ADTypes v1.13.0 [1520ce14] + AbstractTrees v0.4.5 [7d9f7c33] + Accessors v0.1.41 [79e6a3ab] + Adapt v4.1.1 [66dad0bd] + AliasTables v1.1.3 [4fba245c] + ArrayInterface v7.18.0 [e2ed5e7c] + Bijections v0.1.9 [d360d2e6] + ChainRulesCore v1.25.1 [861a8166] + Combinatorics v1.0.2 [3709ef60] + CommonEq v0.2.1 [38540f10] + CommonSolve v0.2.4 [bbf7d656] + CommonSubexpressions v0.3.1 [f70d9fcc] + CommonWorldInvalidations v1.0.0 [34da2185] + Compat v4.16.0 [b152e2b5] + CompositeTypes v0.1.4 [a33af91c] + CompositionsBase v0.1.2 [8f4d0f93] + Conda v1.10.2 [187b0558] + ConstructionBase v1.5.8 [aaaaaaaa] + ControlSystemsBase v1.14.3 [9a962f9c] + DataAPI v1.16.0 [864edb3b] + DataStructures v0.18.20 [e2d170a0] + DataValueInterfaces v1.0.0 [163ba53b] + DiffResults v1.1.0 [b552c78f] + DiffRules v1.15.1 [31c24e10] + Distributions v0.25.117 [ffbed154] + DocStringExtensions v0.9.3 [5b8099bc] + DomainSets v0.7.15 [7c1d4256] + DynamicPolynomials v0.6.1 [4e289a0a] + EnumX v1.0.4 [e2ba6199] + ExprTools v0.1.10 ⌅ [6b7a57c9] + Expronicon v0.8.5 [1a297f60] + FillArrays v1.13.0 [1fa38f19] + Format v1.3.7 [f6369f11] + ForwardDiff v0.10.38 [069b7b12] + FunctionWrappers v1.1.3 [77dc65aa] + FunctionWrappersWrappers v0.1.3 [46192b85] + GPUArraysCore v0.2.0 [34004b35] + HypergeometricFunctions v0.3.27 [615f187c] + IfElse v0.1.1 [18e54dd8] + IntegerMathUtils v0.1.2 [8197267c] + IntervalSets v0.7.10 [3587e190] + InverseFunctions v0.1.17 [92d709cd] + IrrationalConstants v0.2.4 [82899510] + IteratorInterfaceExtensions v1.0.0 [692b3bcd] + JLLWrappers v1.7.0 [682c06a0] + JSON v0.21.4 [b964fa9f] + LaTeXStrings v1.4.0 [23fbe1c1] + Latexify v0.16.6 [7a12625a] + LinearMaps v3.11.3 [2ab3a3ac] + LogExpFunctions v0.3.29 [d8e11817] + MLStyle v0.4.17 [1914dd2f] + MacroTools v0.5.15 [99c1a7ee] + MatrixEquations v2.4.2 [48965c70] + MatrixPencils v1.8.0 [e1d29d7a] + Missings v1.2.0 [102ac46a] + MultivariatePolynomials v0.5.7 [d8a4904e] + MutableArithmetics v1.6.3 [77ba4419] + NaNMath v1.1.2 [6fe1bfb0] + OffsetArrays v1.15.0 [bac558e1] + OrderedCollections v1.8.0 [90014a1f] + PDMats v0.11.32 [69de0a69] + Parsers v2.8.1 [f27b6e38] + Polynomials v4.0.17 [aea7be01] + PrecompileTools v1.2.1 [21216c6a] + Preferences v1.4.3 [27ebfcd6] + Primes v0.5.6 [43287f4e] + PtrArrays v1.3.0 [438e738f] + PyCall v1.96.4 [1fd47b50] + QuadGK v2.11.2 [3cdcf5f2] + RecipesBase v1.3.4 [731186ca] + RecursiveArrayTools v3.29.0 [189a3867] + Reexport v1.2.2 [ae029012] + Requires v1.3.0 [79098fc4] + Rmath v0.8.0 [7e49a35a] + RuntimeGeneratedFunctions v0.5.13 [0bca4576] + SciMLBase v2.74.1 [c0aeaf25] + SciMLOperators v0.3.12 [53ae85a6] + SciMLStructures v1.6.1 [efcf1570] + Setfield v1.1.1 [a2af1166] + SortingAlgorithms v1.2.1 [276daf66] + SpecialFunctions v2.5.0 [90137ffa] + StaticArrays v1.9.12 [1e83bf80] + StaticArraysCore v1.4.3 [10745b16] + Statistics v1.11.1 [82ae8749] + StatsAPI v1.7.0 [2913bbd2] + StatsBase v0.34.4 [4c63d2b9] + StatsFuns v1.3.2 [24249f21] + SymPy v2.3.2 [458b697b] + SymPyCore v0.2.11 [886cb795] + SymbolicControlSystems v0.3.0 [2efcf032] + SymbolicIndexingInterface v0.3.37 [19f23fe9] + SymbolicLimits v0.2.2 [d1185830] + SymbolicUtils v3.14.0 [0c5d862f] + Symbolics v6.29.0 [3783bdb8] + TableTraits v1.0.1 [bd369af6] + Tables v1.12.0 [8ea1fca8] + TermInterface v2.0.0 [a759f4b9] + TimerOutputs v0.5.26 [a7c27f48] + Unityper v0.1.6 [81def892] + VersionParsing v1.3.0 [897b6980] + WeakValueDicts v0.1.0 [efe28fd5] + OpenSpecFun_jll v0.5.6+0 [f50d1b31] + Rmath_jll v0.5.1+0 [0dad84c5] + ArgTools v1.1.2 [56f22d72] + Artifacts v1.11.0 [2a0f44e3] + Base64 v1.11.0 [ade2ca70] + Dates v1.11.0 [8ba89e20] + Distributed v1.11.0 [f43a241f] + Downloads v1.6.0 [7b1f6079] + FileWatching v1.11.0 [9fa8497b] + Future v1.11.0 [b77e0a4c] + InteractiveUtils v1.11.0 [b27032c2] + LibCURL v0.6.4 [76f85450] + LibGit2 v1.11.0 [8f399da3] + Libdl v1.11.0 [37e2e46d] + LinearAlgebra v1.11.0 [56ddb016] + Logging v1.11.0 [d6f4376e] + Markdown v1.11.0 [a63ad114] + Mmap v1.11.0 [ca575930] + NetworkOptions v1.2.0 [44cfe95a] + Pkg v1.11.0 [de0858da] + Printf v1.11.0 [9a3f8284] + Random v1.11.0 [ea8e919c] + SHA v0.7.0 [9e88b42a] + Serialization v1.11.0 [6462fe0b] + Sockets v1.11.0 [2f01184e] + SparseArrays v1.11.0 [4607b0f0] + SuiteSparse [fa267f1f] + TOML v1.0.3 [a4e569a6] + Tar v1.10.0 [8dfed614] + Test v1.11.0 [cf7118a7] + UUIDs v1.11.0 [4ec0a83e] + Unicode v1.11.0 [e66e0078] + CompilerSupportLibraries_jll v1.1.1+0 [deac9b47] + LibCURL_jll v8.6.0+0 [e37daf67] + LibGit2_jll v1.7.2+0 [29816b5a] + LibSSH2_jll v1.11.0+1 [c8ffd9c3] + MbedTLS_jll v2.28.6+0 [14a3606d] + MozillaCACerts_jll v2023.12.12 [4536629a] + OpenBLAS_jll v0.3.27+1 [05823500] + OpenLibm_jll v0.8.1+2 [bea87d4a] + SuiteSparse_jll v7.7.0+0 [83775a58] + Zlib_jll v1.2.13+1 [8e850b90] + libblastrampoline_jll v5.11.0+0 [8e850ede] + nghttp2_jll v1.59.0+0 [3f19e933] + p7zip_jll v17.4.0+2 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m` Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/b19db3927f0db4151cb86d073689f2428e524576/build.log` Building PyCall → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/9816a3826b0ebf49ab4926e2b18842ad8b5c8f04/build.log` Installation completed after 63.2s ################################################################################ # Precompilation # Precompiling PkgEval dependencies... Precompiling package dependencies... Precompilation completed after 89.82s ################################################################################ # Testing # Testing SymbolicControlSystems Status `/tmp/jl_MnE5Z7/Project.toml` [aaaaaaaa] ControlSystemsBase v1.14.3 [23fbe1c1] Latexify v0.16.6 [24249f21] SymPy v2.3.2 [886cb795] SymbolicControlSystems v0.3.0 [d1185830] SymbolicUtils v3.14.0 [0c5d862f] Symbolics v6.29.0 [b77e0a4c] InteractiveUtils v1.11.0 [37e2e46d] LinearAlgebra v1.11.0 [8dfed614] Test v1.11.0 Status `/tmp/jl_MnE5Z7/Manifest.toml` [47edcb42] ADTypes v1.13.0 [1520ce14] AbstractTrees v0.4.5 [7d9f7c33] Accessors v0.1.41 [79e6a3ab] Adapt v4.1.1 [66dad0bd] AliasTables v1.1.3 [4fba245c] ArrayInterface v7.18.0 [e2ed5e7c] Bijections v0.1.9 [d360d2e6] ChainRulesCore v1.25.1 [861a8166] Combinatorics v1.0.2 [3709ef60] CommonEq v0.2.1 [38540f10] CommonSolve v0.2.4 [bbf7d656] CommonSubexpressions v0.3.1 [f70d9fcc] CommonWorldInvalidations v1.0.0 [34da2185] Compat v4.16.0 [b152e2b5] CompositeTypes v0.1.4 [a33af91c] CompositionsBase v0.1.2 [8f4d0f93] Conda v1.10.2 [187b0558] ConstructionBase v1.5.8 [aaaaaaaa] ControlSystemsBase v1.14.3 [9a962f9c] DataAPI v1.16.0 [864edb3b] DataStructures v0.18.20 [e2d170a0] DataValueInterfaces v1.0.0 [163ba53b] DiffResults v1.1.0 [b552c78f] DiffRules v1.15.1 [31c24e10] Distributions v0.25.117 [ffbed154] DocStringExtensions v0.9.3 [5b8099bc] DomainSets v0.7.15 [7c1d4256] DynamicPolynomials v0.6.1 [4e289a0a] EnumX v1.0.4 [e2ba6199] ExprTools v0.1.10 ⌅ [6b7a57c9] Expronicon v0.8.5 [1a297f60] FillArrays v1.13.0 [1fa38f19] Format v1.3.7 [f6369f11] ForwardDiff v0.10.38 [069b7b12] FunctionWrappers v1.1.3 [77dc65aa] FunctionWrappersWrappers v0.1.3 [46192b85] GPUArraysCore v0.2.0 [34004b35] HypergeometricFunctions v0.3.27 [615f187c] IfElse v0.1.1 [18e54dd8] IntegerMathUtils v0.1.2 [8197267c] IntervalSets v0.7.10 [3587e190] InverseFunctions v0.1.17 [92d709cd] IrrationalConstants v0.2.4 [82899510] IteratorInterfaceExtensions v1.0.0 [692b3bcd] JLLWrappers v1.7.0 [682c06a0] JSON v0.21.4 [b964fa9f] LaTeXStrings v1.4.0 [23fbe1c1] Latexify v0.16.6 [7a12625a] LinearMaps v3.11.3 [2ab3a3ac] LogExpFunctions v0.3.29 [d8e11817] MLStyle v0.4.17 [1914dd2f] MacroTools v0.5.15 [99c1a7ee] MatrixEquations v2.4.2 [48965c70] MatrixPencils v1.8.0 [e1d29d7a] Missings v1.2.0 [102ac46a] MultivariatePolynomials v0.5.7 [d8a4904e] MutableArithmetics v1.6.3 [77ba4419] NaNMath v1.1.2 [6fe1bfb0] OffsetArrays v1.15.0 [bac558e1] OrderedCollections v1.8.0 [90014a1f] PDMats v0.11.32 [69de0a69] Parsers v2.8.1 [f27b6e38] Polynomials v4.0.17 [aea7be01] PrecompileTools v1.2.1 [21216c6a] Preferences v1.4.3 [27ebfcd6] Primes v0.5.6 [43287f4e] PtrArrays v1.3.0 [438e738f] PyCall v1.96.4 [1fd47b50] QuadGK v2.11.2 [3cdcf5f2] RecipesBase v1.3.4 [731186ca] RecursiveArrayTools v3.29.0 [189a3867] Reexport v1.2.2 [ae029012] Requires v1.3.0 [79098fc4] Rmath v0.8.0 [7e49a35a] RuntimeGeneratedFunctions v0.5.13 [0bca4576] SciMLBase v2.74.1 [c0aeaf25] SciMLOperators v0.3.12 [53ae85a6] SciMLStructures v1.6.1 [efcf1570] Setfield v1.1.1 [a2af1166] SortingAlgorithms v1.2.1 [276daf66] SpecialFunctions v2.5.0 [90137ffa] StaticArrays v1.9.12 [1e83bf80] StaticArraysCore v1.4.3 [10745b16] Statistics v1.11.1 [82ae8749] StatsAPI v1.7.0 [2913bbd2] StatsBase v0.34.4 [4c63d2b9] StatsFuns v1.3.2 [24249f21] SymPy v2.3.2 [458b697b] SymPyCore v0.2.11 [886cb795] SymbolicControlSystems v0.3.0 [2efcf032] SymbolicIndexingInterface v0.3.37 [19f23fe9] SymbolicLimits v0.2.2 [d1185830] SymbolicUtils v3.14.0 [0c5d862f] Symbolics v6.29.0 [3783bdb8] TableTraits v1.0.1 [bd369af6] Tables v1.12.0 [8ea1fca8] TermInterface v2.0.0 [a759f4b9] TimerOutputs v0.5.26 [a7c27f48] Unityper v0.1.6 [81def892] VersionParsing v1.3.0 [897b6980] WeakValueDicts v0.1.0 [efe28fd5] OpenSpecFun_jll v0.5.6+0 [f50d1b31] Rmath_jll v0.5.1+0 [0dad84c5] ArgTools v1.1.2 [56f22d72] Artifacts v1.11.0 [2a0f44e3] Base64 v1.11.0 [ade2ca70] Dates v1.11.0 [8ba89e20] Distributed v1.11.0 [f43a241f] Downloads v1.6.0 [7b1f6079] FileWatching v1.11.0 [9fa8497b] Future v1.11.0 [b77e0a4c] InteractiveUtils v1.11.0 [b27032c2] LibCURL v0.6.4 [76f85450] LibGit2 v1.11.0 [8f399da3] Libdl v1.11.0 [37e2e46d] LinearAlgebra v1.11.0 [56ddb016] Logging v1.11.0 [d6f4376e] Markdown v1.11.0 [a63ad114] Mmap v1.11.0 [ca575930] NetworkOptions v1.2.0 [44cfe95a] Pkg v1.11.0 [de0858da] Printf v1.11.0 [9a3f8284] Random v1.11.0 [ea8e919c] SHA v0.7.0 [9e88b42a] Serialization v1.11.0 [6462fe0b] Sockets v1.11.0 [2f01184e] SparseArrays v1.11.0 [4607b0f0] SuiteSparse [fa267f1f] TOML v1.0.3 [a4e569a6] Tar v1.10.0 [8dfed614] Test v1.11.0 [cf7118a7] UUIDs v1.11.0 [4ec0a83e] Unicode v1.11.0 [e66e0078] CompilerSupportLibraries_jll v1.1.1+0 [deac9b47] LibCURL_jll v8.6.0+0 [e37daf67] LibGit2_jll v1.7.2+0 [29816b5a] LibSSH2_jll v1.11.0+1 [c8ffd9c3] MbedTLS_jll v2.28.6+0 [14a3606d] MozillaCACerts_jll v2023.12.12 [4536629a] OpenBLAS_jll v0.3.27+1 [05823500] OpenLibm_jll v0.8.1+2 [bea87d4a] SuiteSparse_jll v7.7.0+0 [83775a58] Zlib_jll v1.2.13+1 [8e850b90] libblastrampoline_jll v5.11.0+0 [8e850ede] nghttp2_jll v1.59.0+0 [3f19e933] p7zip_jll v17.4.0+2 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. Testing Running tests... Precompiling SymbolicControlSystems... 13617.1 ms ✓ SymPyCore → SymPyCoreSymbolicUtilsExt 1 dependency successfully precompiled in 17 seconds. 187 already precompiled. Precompiling SymPy... 7442.8 ms ✓ SymPyCore 11936.4 ms ✓ SymPy 2 dependencies successfully precompiled in 22 seconds. 47 already precompiled. Precompiling Symbolics... 2670.0 ms ✓ Accessors → IntervalSetsExt 6265.3 ms ✓ MultivariatePolynomials 4523.2 ms ✓ DomainSets 2782.0 ms ✓ SciMLBase → SciMLBaseChainRulesCoreExt 3715.0 ms ✓ DynamicPolynomials 37481.9 ms ✓ SymbolicUtils 5425.4 ms ✓ SymbolicLimits 99744.7 ms ✓ Symbolics 8 dependencies successfully precompiled in 165 seconds. 152 already precompiled. Precompiling PolynomialsMutableArithmeticsExt... 3093.6 ms ✓ Polynomials → PolynomialsMutableArithmeticsExt 1 dependency successfully precompiled in 3 seconds. 26 already precompiled. Precompiling LinearMapsChainRulesCoreExt... 856.1 ms ✓ LinearMaps → LinearMapsChainRulesCoreExt 1 dependency successfully precompiled in 1 seconds. 9 already precompiled. Precompiling SymPyCoreSymbolicUtilsExt... 4683.5 ms ✓ SymPyCore → SymPyCoreSymbolicUtilsExt 1 dependency successfully precompiled in 5 seconds. 87 already precompiled. Precompiling SciMLBasePyCallExt... 5810.1 ms ✓ SciMLBase → SciMLBasePyCallExt 1 dependency successfully precompiled in 6 seconds. 75 already precompiled. Precompiling SymbolicsSymPyExt... 14489.6 ms ✓ Symbolics → SymbolicsSymPyExt 1 dependency successfully precompiled in 16 seconds. 171 already precompiled. Precompiling SymbolicsForwardDiffExt... 10247.1 ms ✓ Symbolics → SymbolicsForwardDiffExt 1 dependency successfully precompiled in 12 seconds. 165 already precompiled. [ Info: Testing To symbolic [ Info: SymPy: Testing Sym -> tf and vice versa ┌ Warning: Unable to balance state-space, returning original system └ @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/7Tmef/src/types/conversion.jl:183 ┌ Warning: Unable to balance state-space, returning original system └ @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/7Tmef/src/types/conversion.jl:183 ┌ Warning: Unable to balance state-space, returning original system └ @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/7Tmef/src/types/conversion.jl:183 ┌ Warning: Unable to balance state-space, returning original system └ @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/7Tmef/src/types/conversion.jl:183 [ Info: Testing sym2num [ Info: Testing Tustin and C-code [ Info: Perforing pole-zero cancellation (this might take a while) 0.008287 seconds (20 allocations: 344 bytes) 0.006047 seconds (15 allocations: 416 bytes) [ Info: Calling free_symbols [ Info: Set(Sym[z, J, c]) [ Info: Finding common subexpressions [ Info: Writing numerator term 1/1 [ Info: Writing numerator term 2/1 [ Info: Writing numerator term 3/1 [ Info: Writing denominator term 1/2 [ Info: Writing denominator term 2/2 #include #include double transfer_function(double ui, double J, double c) { static double u[3] = {0}; static double y[3] = {0}; int i; for (i=2; i > 0; --i) { u[i] = u[i-1]; } u[0] = ui; for (i=2; i > 0; --i) { y[i] = y[i-1]; } y[0] = 0; double x0 = 20.0*c; double x1 = pow(J, 2); double x2 = 400.0*x1 + 1.0; double x3 = 1.0/(x0 + x2); double x4 = 1.0*x3; y[0] += (x4)*u[0]; y[0] += (2.0*x3)*u[1]; y[0] += (x4)*u[2]; y[0] += (-x3*(2.0 - 800.0*x1))*y[1]; y[0] += (-x3*(-x0 + x2))*y[2]; return y[0]; } ┌ Warning: Unable to balance state-space, returning original system └ @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/7Tmef/src/types/conversion.jl:183 #include #include void transfer_function(double *y, double u, double J, double c) { static double x[2] = {0}; // Current state double xp[2] = {0}; // Next state int i; // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (u - x[0]*(400.0*pow(J, 2) - 20.0*c + 1.0)/(400.0*pow(J, 2) + 20.0*c + 1.0) - x[1]*(2.0 - 800.0*pow(J, 2))/(400.0*pow(J, 2) + 20.0*c + 1.0)); // Accumulate the output y = C*x + D*u y[0] = (1.0*u/(400.0*pow(J, 2) + 20.0*c + 1.0) + x[0]*(-1.0*6.2500000000000003e-6/pow(pow(J, 2) + 0.050000000000000003*c + 0.0025000000000000001, 2)*(400.0*pow(J, 2) - 20.0*c + 1.0) + 1.0/(400.0*pow(J, 2) + 20.0*c + 1.0)) + x[1]*(-1.0*(2.0 - 800.0*pow(J, 2))*6.2500000000000003e-6/pow(pow(J, 2) + 0.050000000000000003*c + 0.0025000000000000001, 2) + 2.0/(400.0*pow(J, 2) + 20.0*c + 1.0))); // Make the predicted state the current state for (i=0; i < 2; ++i) { x[i] = xp[i]; } } ┌ Warning: Unable to balance state-space, returning original system └ @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/7Tmef/src/types/conversion.jl:183 [ Info: Finding common subexpressions #include #include void transfer_function(double *y, double u, double J, double c) { static double x[2] = {0}; // Current state double xp[2] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x double x0 = pow(J, 2); double x1 = 2.0 - 800.0*x0; double x2 = 20.0*c; double x3 = 400.0*x0 + 1.0; double x4 = 1.0/(x2 + x3); double x5 = -x2 + x3; double x6 = 6.2500000000000003e-6/pow(0.050000000000000003*c + x0 + 0.0025000000000000001, 2); // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (u - x1*x4*x[1] - x4*x5*x[0]); // Accumulate the output y = C*x + D*u y[0] = (1.0*u*x4 + x[0]*(1.0*x4 - 1.0*x5*x6) + x[1]*(-1.0*x1*x6 + 2.0*x4)); // Make the predicted state the current state for (i=0; i < 2; ++i) { x[i] = xp[i]; } } [ Info: Perforing pole-zero cancellation (this might take a while) 0.011093 seconds (23 allocations: 448 bytes) 0.011236 seconds (15 allocations: 416 bytes) [ Info: Calling free_symbols [ Info: Set(Sym[w, z, d, T]) [ Info: Finding common subexpressions [ Info: Writing numerator term 1/1 [ Info: Writing numerator term 2/1 [ Info: Writing numerator term 3/1 [ Info: Writing numerator term 4/1 [ Info: Writing denominator term 1/3 [ Info: Writing denominator term 2/3 [ Info: Writing denominator term 3/3 #include #include double transfer_function(double ui, double T, double d, double w) { static double u[4] = {0}; static double y[4] = {0}; int i; for (i=3; i > 0; --i) { u[i] = u[i-1]; } u[0] = ui; for (i=3; i > 0; --i) { y[i] = y[i-1]; } y[0] = 0; double x0 = 8000000.0*T; double x1 = pow(w, 2); double x2 = 1.0*x1; double x3 = d*w; double x4 = 80000.0*T*x3 + 40000.0; double x5 = x2 + x4; double x6 = 200.0*T*x1; double x7 = 400.0*x3; double x8 = x6 + x7; double x9 = 1.0/(x0 + x5 + x8); double x10 = x2*x9; double x11 = 3.0*x1*x9; double x12 = 24000000.0*T; double x13 = -3.0*x1 + x4; double x14 = -x6 - x7; y[0] += (x10)*u[0]; y[0] += (x11)*u[1]; y[0] += (x11)*u[2]; y[0] += (x10)*u[3]; y[0] += (-x9*(-x12 - x13 - x14))*y[1]; y[0] += (-x9*(x12 - x13 - x8))*y[2]; y[0] += (-x9*(-x0 + x14 + x5))*y[3]; return y[0]; } ┌ Warning: Unable to balance state-space, returning original system └ @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/7Tmef/src/types/conversion.jl:183 [ Info: Finding common subexpressions #include #include void transfer_function(double *y, double u, double T, double d, double w) { static double x[3] = {0}; // Current state double xp[3] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x double x0 = 8000000.0*T; double x1 = pow(w, 2); double x2 = 1.0*x1; double x3 = d*w; double x4 = T*x3; double x5 = 80000.0*x4 + 40000.0; double x6 = x2 + x5; double x7 = T*x1; double x8 = 200.0*x7; double x9 = 400.0*x3; double x10 = -x8 - x9; double x11 = -x0 + x10 + x6; double x12 = x8 + x9; double x13 = 1.0/(x0 + x12 + x6); double x14 = 24000000.0*T; double x15 = -3.0*x1 + x5; double x16 = -x12 + x14 - x15; double x17 = -x10 - x14 - x15; double x18 = 1.5625e-14/pow(T + 1.2499999999999999e-7*x1 + 5.0000000000000002e-5*x3 + 0.01*x4 + 2.5000000000000001e-5*x7 + 0.0050000000000000001, 2); double x19 = -3.0*x1*x13; // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (x[2]); xp[2] = (u - x11*x13*x[0] - x13*x16*x[1] - x13*x17*x[2]); // Accumulate the output y = C*x + D*u y[0] = (u*x13*x2 + x[0]*(-1.0*x1*x11*x18 + 1.0*x1*x13) + x[1]*(-1.0*x1*x16*x18 - x19) + x[2]*(-1.0*x1*x17*x18 - x19)); // Make the predicted state the current state for (i=0; i < 3; ++i) { x[i] = xp[i]; } } [ Info: Perforing pole-zero cancellation (this might take a while) 0.011473 seconds (20 allocations: 432 bytes) 0.011882 seconds (15 allocations: 416 bytes) ┌ Warning: Unable to balance state-space, returning original system └ @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/7Tmef/src/types/conversion.jl:183 [ Info: Finding common subexpressions #include #include void transfer_function(double *y, double *u, double T, double d, double w) { static double x[6] = {0}; // Current state double xp[6] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x double x0 = 8000000.0*T; double x1 = pow(w, 2); double x2 = 1.0*x1; double x3 = d*w; double x4 = T*x3; double x5 = 80000.0*x4 + 40000.0; double x6 = x2 + x5; double x7 = T*x1; double x8 = 200.0*x7; double x9 = 400.0*x3; double x10 = x8 + x9; double x11 = 1.0/(x0 + x10 + x6); double x12 = -x8 - x9; double x13 = -x0 + x12 + x6; double x14 = x11*x13; double x15 = 24000000.0*T; double x16 = -3.0*x1 + x5; double x17 = -x10 + x15 - x16; double x18 = x11*x17; double x19 = -x12 - x15 - x16; double x20 = x11*x19; double x21 = 1.5625e-14/pow(T + 1.2499999999999999e-7*x1 + 5.0000000000000002e-5*x3 + 0.01*x4 + 2.5000000000000001e-5*x7 + 0.0050000000000000001, 2); double x22 = -3.0*x1*x11; double x23 = -6.0*x1*x11; // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (x[2]); xp[2] = (u[0] - x14*x[0] - x18*x[1] - x20*x[2]); xp[3] = (x[4]); xp[4] = (x[5]); xp[5] = (u[1] - x14*x[3] - x18*x[4] - x20*x[5]); // Accumulate the output y = C*x + D*u y[0] = (u[0]*x11*x2 + 2.0*u[1]*x1*x11 + x[0]*(1.0*x1*x11 - 1.0*x1*x13*x21) + x[1]*(-1.0*x1*x17*x21 - x22) + x[2]*(-1.0*x1*x19*x21 - x22) + x[3]*(2.0*x1*x11 - 2.0*x1*x13*x21) + x[4]*(-2.0*x1*x17*x21 - x23) + x[5]*(-2.0*x1*x19*x21 - x23)); // Make the predicted state the current state for (i=0; i < 6; ++i) { x[i] = xp[i]; } } ┌ Warning: Unable to balance state-space, returning original system └ @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/7Tmef/src/types/conversion.jl:183 [ Info: Perforing pole-zero cancellation (this might take a while) 0.007572 seconds (12 allocations: 280 bytes) 0.004657 seconds (17 allocations: 432 bytes) [ Info: Calling free_symbols [ Info: Set(Sym[z]) [ Info: Finding common subexpressions [ Info: Writing numerator term 1/1 [ Info: Writing numerator term 2/1 [ Info: Writing numerator term 3/1 [ Info: Writing denominator term 1/2 [ Info: Writing denominator term 2/2 #include #include double transfer_function(double ui) { static double u[3] = {0}; static double y[3] = {0}; int i; for (i=2; i > 0; --i) { u[i] = u[i-1]; } u[0] = ui; for (i=2; i > 0; --i) { y[i] = y[i-1]; } y[0] = 0; y[0] += (0.00061690314620604567)*u[0]; y[0] += (0.0012338062924120913)*u[1]; y[0] += (0.00061690314620604567)*u[2]; y[0] += (1.9728562615669341)*y[1]; y[0] += (-0.97532387415175814)*y[2]; return y[0]; } ┌ Warning: Unable to balance state-space, returning original system └ @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/7Tmef/src/types/conversion.jl:183 #include #include void transfer_function(double *y, double u) { static double x[2] = {0}; // Current state double xp[2] = {0}; // Next state int i; // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (u - 0.97532387415175814*x[0] + 1.9728562615669341*x[1]); // Accumulate the output y = C*x + D*u y[0] = (0.00061690314620604567*u + 1.5222779671956728e-5*x[0] + 0.0024508675271850302*x[1]); // Make the predicted state the current state for (i=0; i < 2; ++i) { x[i] = xp[i]; } } [ Info: Finding common subexpressions #include #include void transfer_function(double *y, double u) { static double x[2] = {0}; // Current state double xp[2] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x // Advance the state xp = Ax + Bu xp[0] = (x[1]); xp[1] = (u - 0.97532387415175814*x[0] + 1.9728562615669341*x[1]); // Accumulate the output y = C*x + D*u y[0] = (0.00061690314620604567*u + 1.5222779671956728e-5*x[0] + 0.0024508675271850302*x[1]); // Make the predicted state the current state for (i=0; i < 2; ++i) { x[i] = xp[i]; } } [ Info: Finding common subexpressions #include #include void transfer_function(double *y, double u) { static double x[4] = {0}; // Current state double xp[4] = {0}; // Next state int i; // Common sub expressions. These are all called xi, but are unrelated to the state x // Advance the state xp = Ax + Bu xp[0] = (0.0024676125848241831*u + 0.9987661937075879*x[0] + 0.049352251696483655*x[1]); xp[1] = (0.09870450339296731*u - 0.049352251696483655*x[0] + 0.97409006785934615*x[1]); xp[2] = (0.0047505938242280296*u + 0.99524940617577196*x[2] + 0.095011876484560581*x[3]); xp[3] = (0.095011876484560581*u - 0.095011876484560581*x[2] + 0.90023752969121151*x[3]); // Accumulate the output y = C*x + D*u y[0] = (0.00061690314620604578*u + 0.499691548426897*x[0] + 0.012338062924120914*x[1]); y[1] = (0.0023752969121140148*u + 0.99762470308788598*x[2] + 0.047505938242280291*x[3]); // Make the predicted state the current state for (i=0; i < 4; ++i) { x[i] = xp[i]; } } [ Info: Symbolics: Testing Sym -> tf and vice versa [ Info: Testing conversion between SymPy and Symbolics Test Summary: | Pass Total Time SymbolicControlSystems.jl | 89 89 3m47.9s Testing SymbolicControlSystems tests passed Testing completed after 509.86s PkgEval succeeded after 717.7s