diff --git a/src/DoubleTank.jl b/src/DoubleTank.jl index 70ee7da889464c6873c14e628c564f0bb7325822..04e5113b9cb9c2a98ae348fabb6a991b43b7f179 100644 --- a/src/DoubleTank.jl +++ b/src/DoubleTank.jl @@ -1,22 +1,6 @@ -# Interface implementation Ball And Beam ==================================================== - -# The ball and beam can be used in two modes, either just the Beam, in which case there is a -# single output (measurement signal) or the BallAndBeam, in which case there are two. -# There are a few union types defined for convenience, these are -# AbstractBeam = Union{Beam, BeamSimulator} -# AbstractBallAndBeam = Union{BallAndBeam, BallAndBeamSimulator} -# AbstractBeamOrBallAndBeam = All types -# Although not Abstract per se, the names AbstractBeam etc. were chosen since this reflects -# their usage in dispatch. - -#export Beam, BeamSimulator, AbstractBeam, BallAndBeam, BallAndBeamSimulator, AbstractBeamOrBallAndBeam export DoubleTankSimulator using LabConnections.Computer #for LabStream -# @with_kw allows specification of default values for fields. If none is given, this value must be supplied by the user. replaces many constructors that would otherwise only supply default values. -# Call constructor like Beam(bias=1.0) if you want a non-default value for bias -#Beam(;kwargs...) -#Physical beam process const uppertankempty = 0.0 const lowertankempty = 0.0 diff --git a/src/livetankdemo.jl b/src/livetankdemo.jl index acf4ea5376ce596a62a653a5109f54ef3d10d999..121232d7ca1fb393c260ef6a04be9844287ebbc8 100644 --- a/src/livetankdemo.jl +++ b/src/livetankdemo.jl @@ -4,30 +4,10 @@ include("DoubleTank.jl") include("tanklabgui.jl") -#using BallAndBeam, ControlSystems, JLD, LabProcesses, Plots -# @load "workspace.jld" # Run this command to restore a saved workspace - -#P = LabProcesses.Beam(bias = 0.) # Replace for BeamSimulator() to run simulations -#P = LabProcesses.DoubleTankSimulator() -#h = 0.05 -#x = [0.08, 0.08] -#n = 1 -#α = 2.1e-5 -#A = 4.9e-4 #m^2 -#a1 = 3.1e-6 #m^2 -#a2 = 3.1e-6 #m^2 -#g = 9.81 #m/s^2 - R = DoubleTank() -#S = DoubleTankSimulator(h, copy(x), n) - -#settling_time = 1 #? -#nbr_of_periods = 3 #? - inspectdr(show=false) manual = false -#prbs = PRBSGenerator() function prbs_experiment(P, gui, pidcontroller, ;amplitude = 1, duration = 10000) y = zeros(0:P.h:duration) u = zeros(0:P.h:duration)