Skip to content
Snippets Groups Projects
Commit e16fa511 authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

Update FRTN35_lab1.jl

parent fa42374d
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -11,7 +11,7 @@ nbr_of_periods = 3 ...@@ -11,7 +11,7 @@ nbr_of_periods = 3
# and run three experiments. You may modify the freqency vectors # and run three experiments. You may modify the freqency vectors
# any way you want and add/remove experiments as needed. # any way you want and add/remove experiments as needed.
w1_100 = logspace(log10(1),log10(300),800) w1_100 = logspace(log10(1),log10(300),8)
G1 = fra(P, w1_100, amplitude=1, nbr_of_periods=nbr_of_periods, settling_time=settling_time) G1 = fra(P, w1_100, amplitude=1, nbr_of_periods=nbr_of_periods, settling_time=settling_time)
@save "workspace.jld" @save "workspace.jld"
...@@ -61,7 +61,9 @@ function prbs_experiment(;amplitude = 1, duration = 10) ...@@ -61,7 +61,9 @@ function prbs_experiment(;amplitude = 1, duration = 10)
for (i,t) = enumerate(0:h:duration) for (i,t) = enumerate(0:h:duration)
@periodically h begin @periodically h begin
y[i] = measure(P) y[i] = measure(P)
u[i] = sum(sin(ω*(t-1)) for ω in logspace(-1,3,10))#amplitude*(prbs()-0.5)# randn() u[i] = amplitude*(prbs()-0.5)
#u[i] = amplitude*randn()
#u[i] = amplitude*sum(sin(ω*(t-1)) for ω in logspace(-1,3,10))
control(P, u[i]) control(P, u[i])
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment