functiondesignStateSpaceController
Demonstration of controller design for a state space system
Information
This example demonstrates how to design a lq-controller or a pole placement controller respectively. Compared with example craneController, the plant is smaller to achieve suitable dynamics for animation. The feedback matrices and a simple pre filter for tracking are save to MATLAB files which can be used in ModelicaController library.
It is also shown how to linearize a model of a crane trolley system [1]. The linear model is used as a base for control design
References
- [1] Föllinger O.:
- Regelungstechnik.
Hüthig-Verlag.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| StateSpace | ss | StateSpace(A = [0, 1, 0, 0; 0, 0, 39.2, 0; 0, 0, 0, 1; 0, 0, -49.0, 0], B = [1, 1, 0, 0; 0, 1, 1, 0; 0, 0, 1, 1; 1, 1, 1, 1], C = identity(4), D = zeros(4, 4), yNames = {"s", "v", "phi", "w"}, uNames = {"f", "u2", "u3", "u4"}, xNames = {"s", "v", "phi", "w"}) | |
| Complex[:] | pa | {Complex(-1, 0), Complex(-2, 0), Complex(-2, -0.2), Complex(-2, 0.2)} | assigned poles |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[:,:] | K_pa | feedback matrix pole assignment controller | |
| Real[:,:] | M_pa | pre filter pole assignment controller | |
| Complex[size(ss.A, 1)] | po |