Control models#

This section contains documentation of selected control models. It is only intended to use as reference material.

class irlc.ex04.model_pendulum.SinCosPendulumModel(l=1.0, m=0.8, friction=0.0, max_torque=6.0, transform_coordinates=False)[source]#
phi_x(x)[source]#

Coordinate transformation of the state when the model is discretized.

This function specifies the coordinate transformation xk=Φx(x(tk)) which is applied to the environment when it is discretized. It should accept a list of symbols, corresponding to x, and return a new list of symbols corresponding to the (discrete) coordinates.

Parameters:

x – A list of symbols [x0, x1, ..., xn] corresponding to x(t)

Returns:

A new list of symbols corresponding to the discrete coordinates xk.

phi_x_inv(x)[source]#

Inverse of coordinate transformation for the state.

This function should specify the inverse of the coordinate transformation Φx, i.e. Φx1. In other words, it has to map from the discrete coordinates to the continuous-time coordinates: x(t)=Φx1(xk).

Parameters:

x – A list of symbols [x0, x1, ..., xn] corresponding to xk

Returns:

A new list of symbols corresponding to the continuous-time coordinates x(t).

phi_u(u)[source]#

Coordinate transformation of the action when the model is discretized.

This function specifies the coordinate transformation xk=Φx(x(tk)) which is applied to the environment when it is discretized. It should accept a list of symbols, corresponding to x, and return a new list of symbols corresponding to the (discrete) coordinates.

Parameters:

x – A list of symbols [x0, x1, ..., xn] corresponding to x(t)

Returns:

A new list of symbols corresponding to the discrete coordinates xk.

phi_u_inv(u)[source]#

Inverse of coordinate transformation for the action.

This function should specify the inverse of the coordinate transformation Φu, i.e. Φu1. In other words, it has to map from the discrete coordinates to the continuous-time coordinates: u(t)=Φu1(uk).

Parameters:

x – A list of symbols [u0, u1, ..., ud] corresponding to uk

Returns:

A new list of symbols corresponding to the continuous-time coordinates u(t).

u_bound()[source]#

The bound on the terminal state u(t).

Return type:

Box

Returns:

An appropriate gymnasium Box instance.