Modelica_LinearSystems2.Controller.Examples

Demonstrate the usage of package Controller

Information

Extends from Modelica.Icons.Library (Icon for library).

Package Content

NameDescription
Modelica_LinearSystems2.Controller.Examples.Components Components Contains components of the systems used in Examples package
Modelica_LinearSystems2.Controller.Examples.FirstExample FirstExample First example to demonstrate representative block
Modelica_LinearSystems2.Controller.Examples.SimpleControlledDrive SimpleControlledDrive Simple P-PI cascade controller to control a flexible drive
Modelica_LinearSystems2.Controller.Examples.DoublePendulum DoublePendulum  

Modelica_LinearSystems2.Controller.Examples.FirstExample Modelica_LinearSystems2.Controller.Examples.FirstExample

First example to demonstrate representative block

Information

Extends from Modelica.Icons.Example (Icon for an example model).

Parameters

NameDescription
w 
D 

Modelica_LinearSystems2.Controller.Examples.SimpleControlledDrive Modelica_LinearSystems2.Controller.Examples.SimpleControlledDrive

Simple P-PI cascade controller to control a flexible drive

Information


This example demonstrates the control of a simple model of a flexible drive system with a continuous or discrete P-PI cascade controller. Simulate for 3 s and plot

  ramp.y          (reference angle of loadInertia)
  loadInertia.phi (angle of loadInertia)
  loadInertia.w   (speed of loadInertia)
  torque.tau      (motor torque)         

The standard setting in component sampleClock models a continuous controller. This means that all 3 samplers are just dummy components containing the equation "y=u" and that the PI component in the controller is a continuous PI controller.

Change sampleClock.blockType to "Discrete" block. By this global setting, the 3 sampler blocks and the PI speed controller are transformed into a discrete representation. The base sample time is defined in component sampleClock (= 0.02 s). Every discrete component samples its input and output. The sampling time of every component is a multiple of the base sample time (defined via parameter sampleFactor). Here, the sampler and the PI speed controller are sampled with the base sample frequency. The sample time of the 2 samplers and of the P position controller is a factor of 5 slower.

When comparing the simulations of the continuous and the (more realistic) discrete representation, it turns out that the discrete control systems works a bit worse. This can be improved by reducing the sample time in sampleClock.

The Controller library has several blocks to model this system even more realistically, e.g, by component AD converter to model the quantization errors of the analog measurement signals, component DA converter to model the quantization errors and computing time to determine the analog actuator (torque) signal, and component Noise to add uniformly distributed noise to the measurement signals.

In the following figure simulation results of the discrete and of the continuous controller are shown:

Extends from Modelica.Icons.Example (Icon for an example model).

Parameters

NameDescription
kpGain of P position controller
kvGain of PI speed controller
TvTime constant of PI speed controller [s]

Modelica_LinearSystems2.Controller.Examples.DoublePendulum Modelica_LinearSystems2.Controller.Examples.DoublePendulum

Information


 
This example shows a control system with constant state feedback.
The system model of a crane trolles system is taken from [1]. The
feedback matrix and the pre filter can be loaded from MATLAB files. By default, this files 
are generated by call of Modelica_LinearSystems2.Examples.StateSpace.craneController.

References

  [1] Föllinger, O. "Regelungstechnik", Hüthig-Verlag

Extends from Modelica.Icons.Example (Icon for an example model), Templates.SimpleStateSpaceControl (Template for simple state feedback controllers with an optional pre-filter).

HTML-documentation generated by Dymola Tue Sep 08 18:52:57 2009.