Commit ecb8324a authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

Update readme

parent 113ec3bc
......@@ -20,12 +20,12 @@ line of code :)
3. Create a new file under `/interface_implementations` where you paste all the
copied definitions and implement them. See [`/interface_implementations/ballandbeam.jl`](https://gitlab.control.lth.se/processes/LabProcesses.jl/blob/master/src/interface_implementations/ballandbeam.jl) for an example.
4. Above all function implementations you must define the process type, e.g,
```julia
struct BallAndBeam <: PhysicalProcess
h::Float64
end
BallAndBeam() = BallAndBeam(0.01) # Constructor with default value of sample time
```
```julia
struct BallAndBeam <: PhysicalProcess
h::Float64
end
BallAndBeam() = BallAndBeam(0.01) # Constructor with default value of sample time
```
Make sure you inherit from `PhysicalProcess` or `SimulatedProcess` as appropriate.
5. Documentation of all interface functions is available in the file [interface_documentation.jl](https://gitlab.control.lth.se/processes/LabProcesses.jl/blob/master/src/interface_documentation.jl)
......@@ -51,12 +51,13 @@ end
Often one finds the need to implement a stateful controller, i.e., a function
that has a memory or state. To this end, the function [`sysfilter`](@ref) is
provided. Usage is demonstrated below
provided. This function is used to implement control loops where a signal is filtered through a
dynamical system, i.e., `U(z) = C(z)E(z)`. Usage is demonstrated below
```julia
stateC = init_sysfilter(C)
function control(i)
e = r[i]-y[i]
ui = sysfilter!(stateC, C, e)
u = sysfilter!(stateC, C, e)
end
```
`C` must here be represented by a [`StateSpace`](@ref) type from [`ControlSystems.jl`](https://github.com/JuliaControl/ControlSystems.jl).
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment