Skip to content

Commit

Permalink
update tests to CS v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Aug 25, 2022
1 parent 5fb157e commit 465fd46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DiscretePIDs"
uuid = "c1363496-6848-4723-8758-079b737f6baf"
authors = ["Fredrik Bagge Carlson"]
version = "0.1.0"
version = "0.1.1"

[deps]

Expand Down
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ end
P = c2d(ss(tf(1, [1, 1])), Ts)

## P control
C = c2d(ControlSystems.pid(kp = K), Ts)
C = c2d(ControlSystems.pid(K, 0), Ts)
res = step(feedback(P*C), 3)
res2 = lsim(P, ctrl, 3)

Expand All @@ -31,7 +31,7 @@ res2 = lsim(P, ctrl, 3)
## PI control
Ti = 1
pid = DiscretePID(; K, Ts, Ti)
C = c2d(ControlSystems.pid(kp = K, ki = Ti, series=true, time=true), Ts)
C = c2d(ControlSystems.pid(K, Ti), Ts)
res = step(feedback(P*C), 3)
res2 = lsim(P, ctrl, 3)

Expand Down Expand Up @@ -79,7 +79,7 @@ ctrl = function(x,t)
u = pid(r, y)
end

C = c2d(ControlSystems.pid(kp = K, ki = Ti, series=true, time=true), Ts)
C = c2d(ControlSystems.pid(K, Ti), Ts)
res = step(feedback(P*C), Tf)
res2 = lsim(P, ctrl, Tf)

Expand Down Expand Up @@ -128,7 +128,7 @@ ctrl = function(x,t)
r = 1
u = pid(r, y)
end
C = c2d(ControlSystems.pid(kp = K), Ts)
C = c2d(ControlSystems.pid(K, 0), Ts)
res = step(feedback(P*C), 3)
res2 = lsim(P, ctrl, 3)

Expand Down

0 comments on commit 465fd46

Please sign in to comment.