diff --git a/src/FRTN35_lab1.jl b/src/FRTN35_lab1.jl index 2eb3cb00779433cdd1bd82cd0a03e7167a8c88af..ebafbc7df1c737e2b367cdae0a9aba72434d820e 100644 --- a/src/FRTN35_lab1.jl +++ b/src/FRTN35_lab1.jl @@ -73,10 +73,10 @@ end y,u = prbs_experiment(duration = 10, amplitude = 1) plot([u y], lab=["u" "y"]) +bopl(G123, lab="FRA", legend=:left) + na = 4 # Order of A polynomial nb = 2 # Order of B polynomial arxtf, Σ = arx(h, y, u, na, nb) # Estimate transfer function with ARX method - -bopl(G123, lab="Measured transfer function") -bodeconfidence!(arxtf, Σ, ω = exp10.(LinRange(0,3,200)), linecolor=:red) # The exclamation mark (!) +bodeconfidence!(arxtf, Σ, ω = exp10.(LinRange(0,3,200)), lab="ARX na=$(na)") # The exclamation mark (!) # adds to the previous plot. If there is no plot open, remove the ! diff --git a/src/arx.jl b/src/arx.jl index f430a7388d456acff4769fc994d2e26d8ac0fe78..d074eafd70a2e03c5735dfd2af81445e09b66a94 100644 --- a/src/arx.jl +++ b/src/arx.jl @@ -160,7 +160,7 @@ bodeconfidence ribbon := (lowermag, uppermag) yscale --> :log10 xscale --> :log10 - alpha --> 0.3 + fillalpha --> 0.2 ω, mag end @series begin @@ -169,7 +169,7 @@ bodeconfidence ylabel --> "Phase [deg]" xlabel --> "Frequency [rad/s]" xscale --> :log10 - alpha --> 0.3 + fillalpha --> 0.2 ω, phase end nothing