Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releasenotes #566

Merged
merged 58 commits into from
Nov 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ccab858
Avoid unnecessarily large realization for feedback of TransferFunctio…
olof3 May 12, 2021
fa29759
add dev brach to PR CI
albheim May 12, 2021
64f8214
Switch u layout (#480)
albheim May 12, 2021
4e490a6
Gangof4 fixes (#486)
olof3 May 13, 2021
23cb3d0
add frequency in Hz to dampreport (#488)
baggepinnen May 13, 2021
6e29a34
updates to nyquistplot (#493)
baggepinnen May 13, 2021
8fc8c59
fix traces in rlocus (#491)
baggepinnen May 13, 2021
d48190d
let lsim handle arguments in lsimplot (#492)
baggepinnen May 13, 2021
6e71421
bugfix: avoid creating continuous system with Ts=0.0 (#496)
olof3 May 13, 2021
e66c352
Deactivate _preprocess_for_freqresp (#497)
baggepinnen May 13, 2021
13862ba
allow balance when converting tf to ss (#495)
baggepinnen May 13, 2021
e86ee12
Better handling of problematic cases for delay systems (#482)
mfalt May 13, 2021
71119e9
Add tustin c2d/d2c method (#487)
baggepinnen May 13, 2021
079559a
correct handling of x0 in lsimplot (#498)
baggepinnen May 13, 2021
6064ddc
move eye def to framework.jl (#499)
baggepinnen May 13, 2021
fa7013f
Fix UndefVarError: T not defined (#501)
baggepinnen May 13, 2021
7a7188b
add axes for ss (#504)
baggepinnen May 14, 2021
a99ad57
pi place and tests (#502)
albheim May 14, 2021
0d9ec6f
Conver to tf in placepi (#507)
albheim May 14, 2021
6853c47
Use nstates instead of nx in lsimplot (#508)
albheim May 16, 2021
c882689
Add predictor (#511)
baggepinnen May 17, 2021
ae87d97
updates to `obsv` (#517)
baggepinnen May 24, 2021
490ba4d
`hz` keyword in `nyquistplot` similar to in `bodeplot` (#518)
baggepinnen May 24, 2021
86c7d63
Fixes to place (#500)
olof3 May 25, 2021
0fc2aa8
allow AbstractStateSpace in several places (#520)
baggepinnen May 25, 2021
d670740
Maintain type for zpk in c2d (#522)
albheim May 26, 2021
9e13f7b
Remove asserts (#523)
albheim May 26, 2021
7323569
fix conversion for custom types (#514)
baggepinnen May 27, 2021
c44544a
more abstract statespaces (#521)
baggepinnen May 28, 2021
b75faea
add controller function (#512)
baggepinnen May 28, 2021
b05d47d
Move plot globals to runtests (#531)
albheim Jun 1, 2021
6023cf2
return similarity transform from `balreal` (#530)
baggepinnen Jun 1, 2021
6e47466
remove incorrect warning in pzmap (#535)
baggepinnen Jun 9, 2021
36e7d50
support hz keyword in sigmaplot similar to bodeplot (#537)
baggepinnen Jun 9, 2021
aaa9cb6
change formatting in dampreport (#536)
baggepinnen Jun 12, 2021
1f6fcec
add additive identity element for statespace and TF (#538)
baggepinnen Jun 12, 2021
714bf85
Fix struct_ctrb_obsv (#540)
baggepinnen Jun 16, 2021
fb7042f
Yet another fix for struct_ctrb_states. Closes #475 (#541)
baggepinnen Jun 18, 2021
2d89058
bugfix for negative real pole in damp (#539)
baggepinnen Aug 21, 2021
73451e4
Fix #546
baggepinnen Aug 21, 2021
93feb05
minor typographic changes
baggepinnen Aug 21, 2021
dcecd3c
optional epsilon in dcgain (#548)
baggepinnen Aug 21, 2021
ad09be5
bugfix: use correct type for saving dde solutions (#549)
olof3 Sep 27, 2021
aa74208
bugfix dcgain (#551)
baggepinnen Sep 29, 2021
c31d065
correct type of initial state in step (#553)
baggepinnen Oct 2, 2021
6280df9
remove version checks
albheim Oct 5, 2021
f644db6
Fix spacing in type printing
albheim Oct 5, 2021
01044bc
Merge pull request #555 from JuliaControl/albheim/remove_version_checks
baggepinnen Oct 5, 2021
2cb8d86
write `struct_ctrb_states` in terms of `iszero` instead of `== 0` (#557)
baggepinnen Oct 10, 2021
a0c960a
remove `issmooth` (#561)
baggepinnen Oct 20, 2021
851ecbc
Return a result structure from lsim (#529)
baggepinnen Oct 20, 2021
57846d1
remove LQG (#564)
baggepinnen Oct 24, 2021
87cb84d
pole->poles tzero->tzeros (#562)
baggepinnen Nov 6, 2021
a529b01
update usage of plot for step simulation
baggepinnen Nov 6, 2021
7bbab78
add doctest filters
baggepinnen Nov 7, 2021
1c8f5db
add release notes
baggepinnen Nov 7, 2021
3cd622f
Update README.md
baggepinnen Nov 7, 2021
4ffc4f9
Update README.md
baggepinnen Nov 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- master
- dev
push:
branches:
- master
Expand Down
37 changes: 12 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,18 @@ using Pkg; Pkg.add("ControlSystems")

More details under [releases](https://github.com/JuliaControl/ControlSystems.jl/releases).

### 2020-10
- `lsimplot, stepplot, impulseplot` now have the same signatures as the corresponding non-plotting function.
- New function `d2c` for conversion from discrete to continuous.
### 2021-11
- Time-domain simuations now return a result structure (non breaking)
- *Breaking*: `lsimplot, stepplot, impulseplot` have been replaced by `plot(lsim())` etc.
- *Breaking*: `pole, tzero` has been renamed to their plural form, `poles, tzeros`.
- *Breaking*: `c2d` now no longer returns the `x0map` for statespace systems, see function `c2d_x0map` for the old behavior.
- *Breaking*: The array layout of time and frequency responses has been transposed, i.e., in `y,t,x,u = lsim(sys, ...)`, the output arrays `y,x,u` are now of shape `size(y) == (sys.ny, T)`.
- New functions `observer_controller, observer_predictor, placePI`.
- *Breaking*: The type `LQG` has been removed, see [RobustAndOptimalControl.jl](https://github.com/JuliaControl/RobustAndOptimalControl.jl/blob/master/src/lqg.jl) for its replacement.
- *Breaking*: `balreal` and `baltrunc` return an additional value, the applied similarity transform.
- A large set of bug fixes
- For a full list of changes, [see here](https://github.com/JuliaControl/ControlSystems.jl/pull/565/commits).

### 2020-09-24
Release v0.7 introduces a new `TimeEvolution` type to handle `Discrete/Continuous` systems. See the [release notes](https://github.com/JuliaControl/ControlSystems.jl/releases/tag/v0.7.0).

### 2019-11-03
- Poles and zeros are "not sorted" as in Julia versions < 1.2, even on newer versions of Julia. This should imply that complex conjugates are kept together.

### 2019-05-28
#### Delay systems
- We now support systems with time delays. Example:
```julia
sys = tf(1, [1,1])*delay(1)
stepplot(sys, 5) # Compilation time might be long for first simulation
nyquistplot(sys)
```
#### New examples
- [Delayed systems (frequency domain)](https://github.com/JuliaControl/ControlSystems.jl/blob/master/example/delayed_lti_system.jl)
- [Delayed systems (time domain)](https://github.com/JuliaControl/ControlSystems.jl/blob/master/example/delayed_lti_timeresp.jl)
- [Systems with uncertainty](https://github.com/baggepinnen/MonteCarloMeasurements.jl/blob/master/examples/controlsystems.jl)
- [Robust PID optimization](https://github.com/baggepinnen/MonteCarloMeasurements.jl/blob/master/examples/robust_controller_opt.jl)
### 2019-05-22
New state-space type `HeteroStateSpace` that accepts matrices of heterogeneous types: [example using `StaticArrays`](https://juliacontrol.github.io/ControlSystems.jl/latest/man/creating_systems/#Creating-State-Space-Systems-1).

## Documentation

Expand All @@ -66,7 +53,7 @@ Some of the available commands are:
##### Constructing systems
ss, tf, zpk
##### Analysis
pole, tzero, norm, hinfnorm, linfnorm, ctrb, obsv, gangoffour, margin, markovparam, damp, dampreport, zpkdata, dcgain, covar, gram, sigma, sisomargin
poles, tzeros, norm, hinfnorm, linfnorm, ctrb, obsv, gangoffour, margin, markovparam, damp, dampreport, zpkdata, dcgain, covar, gram, sigma, sisomargin
##### Synthesis
care, dare, dlyap, lqr, dlqr, place, leadlink, laglink, leadlinkat, rstd, rstc, dab, balreal, baltrunc
###### PID design
Expand Down
8 changes: 4 additions & 4 deletions docs/src/examples/example.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```@meta
DocTestSetup = quote
using ControlSystems
using ControlSystems, Plots
plotsDir = joinpath(dirname(pathof(ControlSystems)), "..", "docs", "build", "plots")
mkpath(plotsDir)
save_docs_plot(name) = Plots.savefig(joinpath(plotsDir,name))
Expand All @@ -25,7 +25,7 @@ u(x,t) = -L*x .+ 1.5(t>=2.5)# Form control law (u is a function of t and x), a
t =0:Ts:5
x0 = [1,0]
y, t, x, uout = lsim(sys,u,t,x0=x0)
Plots.plot(t,x, lab=["Position" "Velocity"], xlabel="Time [s]")
Plots.plot(t,x', lab=["Position" "Velocity"], xlabel="Time [s]")

save_docs_plot("lqrplot.svg"); # hide

Expand Down Expand Up @@ -132,8 +132,8 @@ R,S,T = rstc(B⁺,B⁻,A,Bm,Am,Ao,AR) # Calculate the 2-DOF controller polynomia

Gcl = tf(conv(B,T),zpconv(A,R,B,S)) # Form the closed loop polynomial from reference to output, the closed-loop characteristic polynomial is AR + BS, the function zpconv takes care of the polynomial multiplication and makes sure the coefficient vectores are of equal length

stepplot(P)
stepplot!(Gcl) # Visualize the open and closed loop responses.
plot(step(P))
plot!(step(Gcl)) # Visualize the open and closed loop responses.
save_docs_plot("ppstepplot.svg") # hide
gangoffourplot(P, tf(-S,R)) # Plot the gang of four to check that all tranfer functions are OK
save_docs_plot("ppgofplot.svg"); # hide
Expand Down
6 changes: 6 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

```@meta
CurrentModule = ControlSystems
DocTestFilters = [
r"StateSpace.+?\n"
r"HeteroStateSpace.+?\n"
r"TransferFunction.+?\n"
r"DelayLtiSystem.+?\n"
]
```

## Guide
Expand Down
2 changes: 1 addition & 1 deletion docs/src/man/creating_systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ D =
Continuous-time state-space model

julia> HeteroStateSpace(sys, to_sized)
HeteroStateSpace{Continuous, SizedMatrix{2, 2, Int64, 2}, SizedMatrix{2, 1, Int64, 2}, SizedMatrix{1, 2, Int64, 2}, SizedMatrix{1, 1, Int64, 2}}
HeteroStateSpace{Continuous, SizedMatrix{2, 2, Int64, 2, Matrix{Int64}}, SizedMatrix{2, 1, Int64, 2, Matrix{Int64}}, SizedMatrix{1, 2, Int64, 2, Matrix{Int64}}, SizedMatrix{1, 1, Int64, 2, Matrix{Int64}}}
A =
-5 0
0 -5
Expand Down
22 changes: 15 additions & 7 deletions example/dc_motor_lqg_design.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function motor(Ke, Kt, L, R, J, b=1e-3)
end

p60 = motor(Ke, Kt, L, Rel, J)
f1 = stepplot(p60)
f1 = stepplot(p60, 1)
f2 = bodeplot(p60)

# LQR control
Expand All @@ -45,12 +45,20 @@ Nbar = 1. ./ (p60.D - (p60.C - p60.D*K) * inv(p60.A - p60.B*K) * p60.B)
Vd = [10. 0 # covariance of the speed estimation
0 10]; # covariance of the current estimation
Vn = 0.04; # covariance for the speed measurement (radians/s)^2
G = LQG(p60, Q, mat(R), Vd, mat(Vn))
Gcl = G[:cl]
T = G[:T]
S = G[:S];
Ka = kalman(p60, Vd, mat(Vn))
C = ControlSystems.observer_controller(p60, K, Ka)

Gcl = let (A,B,C,D) = ssdata(p60)
Acl = [A-B*K B*K; zero(A) A-Ka*C]
Bcl = [B * Nbar; zero(B)]
Ccl = [C zero(C)]
ss(Acl, Bcl, Ccl, 0)
end

T = Gcl
S = 1-T

# 1000 logarithmically spaced values from -3 to 3
f3 = sigmaplot([S,T], exp10.(range(-3, stop=3, length=1000)))
f4 = stepplot(Gcl, label=["Closed loop system using LQG"])
f3 = bodeplot([Gcl, S, T], exp10.(range(-3, stop=3, length=1000)))
f4 = stepplot(Gcl, 1, label="Closed loop system using LQG")
Plots.plot(f1, f2, f3, f4, layout=(2,2), size=(800, 600))
16 changes: 10 additions & 6 deletions src/ControlSystems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export LTISystem,
ss,
tf,
zpk,
LQG,
isproper,
# Linear Algebra
balance,
Expand All @@ -32,7 +31,6 @@ export LTISystem,
ctrb,
obsv,
place,
luenberger,
# Model Simplification
reduce_sys,
sminreal,
Expand All @@ -42,10 +40,12 @@ export LTISystem,
similarity_transform,
prescale,
innovation_form,
observer_predictor,
observer_controller,
# Stability Analysis
isstable,
pole,
tzero,
poles,
tzeros,
dcgain,
zpkdata,
damp,
Expand Down Expand Up @@ -115,6 +115,8 @@ using MacroTools

abstract type AbstractSystem end


include("types/result_types.jl")
include("types/TimeEvolution.jl")
## Added interface:
# timeevol(Lti) -> TimeEvolution (not exported)
Expand All @@ -141,8 +143,6 @@ include("types/DelayLtiSystem.jl")
include("types/tf.jl")
include("types/zpk.jl")

include("types/lqg.jl") # QUESTION: is it really motivated to have an LQG type?

include("utilities.jl")

include("types/promotion.jl")
Expand All @@ -169,10 +169,14 @@ include("delay_systems.jl")

include("plotting.jl")

@deprecate pole poles
@deprecate tzero tzeros
@deprecate num numvec
@deprecate den denvec
@deprecate norminf hinfnorm
@deprecate diagonalize(s::AbstractStateSpace, digits) diagonalize(s::AbstractStateSpace)
@deprecate luenberger(sys, p) place(sys, p, :o)
@deprecate luenberger(A, C, p) place(A, C, p, :o)
# There are some deprecations in pid_control.jl for laglink/leadlink/leadlinkat

function covar(D::Union{AbstractMatrix,UniformScaling}, R)
Expand Down
Loading