artist.field.kinematic_rigid_body
Classes
Initialize a rigid body kinematic. |
Module Contents
- class artist.field.kinematic_rigid_body.RigidBody(number_of_heliostats: int, heliostat_positions: torch.Tensor, initial_orientations: torch.Tensor, translation_deviation_parameters: torch.Tensor, rotation_deviation_parameters: torch.Tensor, actuator_parameters_non_optimizable: torch.Tensor, actuator_parameters_optimizable: torch.Tensor = torch.tensor([]), device: torch.device | None = None)
Bases:
artist.field.kinematic.KinematicInitialize a rigid body kinematic.
The rigid body kinematic determines transformation matrices that are applied to the heliostat surfaces in order to align them. The heliostats then reflect the incoming light according to the provided aim points. The rigid body kinematic works for heliostats equipped with two actuators that turn the heliostat surfaces. Furthermore, initial orientation offsets and deviation parameters determine the specific behavior of the kinematic.
The kinematic deviations are split into translation and rotation parameters. There are three translation parameters for each joint and for the concentrator. One translation deviation in the east, north and up direction respectively. For joint one and two there are also rotation deviations. For joint one in the north and up direction and for joint two in the east and north direction.
Parameters
- number_of_heliostatsint
The number of heliostats using this rigid body kinematic.
- heliostat_positionstorch.Tensor
The positions of all heliostats. Tensor of shape [number_of_heliostats, 4].
- initial_orientationstorch.Tensor
The initial orientation offsets of all heliostats. Tensor of shape [number_of_heliostats, 4].
- translation_deviation_parameterstorch.Tensor
Kinematic translation deviation parameter. Tensor of shape [number_of_heliostats, 9].
- rotation_deviation_parameterstorch.Tensor
Kinematic rotation deviation parameter. Tensor of shape [number_of_heliostats, 4].
- actuator_parameters_non_optimizabletorch.Tensor
The non-optimizable actuator parameters. Tensor of shape [number_of_heliostats, 7, 2] for linear actuators or [number_of_heliostats, 4, 2] for ideal actuators.
- actuator_parameters_optimizabletorch.Tensor
The optimizable actuator parameters. Tensor of shape [number_of_heliostats, 2, 2] for linear actuators or [] for ideal actuators (default is torch.tensor([])).
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
- number_of_heliostats
- heliostat_positions
- initial_orientations
- motor_positions
- translation_deviation_parameters
- rotation_deviation_parameters
- number_of_active_heliostats = 0
- active_heliostat_positions
- active_initial_orientations
- active_translation_deviation_parameters
- active_rotation_deviation_parameters
- active_motor_positions
- artist_standard_orientation
- actuators
- _compute_orientations_from_motor_positions(motor_positions: torch.Tensor, device: torch.device | None = None) torch.Tensor
Compute orientation matrices from given motor positions without initial orientation offsets.
Parameters
- motor_positionstorch.Tensor
The motor positions. Tensor of shape [number_of_active_heliostats, 2].
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
Returns
- torch.Tensor
The orientation matrices. Tensor of shape [number_of_active_heliostats, 4, 4].
- _apply_initial_orientation_offsets(orientations: torch.Tensor, device: torch.device | None = None) torch.Tensor
Apply the initial orientation offsets to the given orientation matrices.
Parameters
- orientationstorch.Tensor
The orientation matrices. Tensor of shape [number_of_active_heliostats, 4, 4].
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
Returns
- torch.Tensor
The orientation matrices with the initial orientation offset. Tensor of shape [number_of_active_heliostats, 4, 4].
- incident_ray_directions_to_orientations(incident_ray_directions: torch.Tensor, aim_points: torch.Tensor, device: torch.device | None = None, max_num_iterations: int = 2, min_eps: float = 0.0001) torch.Tensor
Compute orientation matrices given incident ray directions.
Parameters
- incident_ray_directionstorch.Tensor
The directions of the incident rays as seen from the heliostats. Tensor of shape [number_of_active_heliostats, 4].
- aim_pointstorch.Tensor
The aim points for the active heliostats. Tensor of shape [number_of_active_heliostats, 4].
- max_num_iterationsint
Maximum number of iterations (default is 2).
- min_epsfloat
Convergence criterion (default is 0.0001).
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
Returns
- torch.Tensor
The orientation matrices. Tensor of shape [number_of_active_heliostats, 4, 4].
- motor_positions_to_orientations(motor_positions: torch.Tensor, device: torch.device | None = None) torch.Tensor
Compute orientation matrices given the motor positions.
Parameters
- motor_positionstorch.Tensor
The motor positions. Tensor of shape [number_of_active_heliostats, 2].
- devicetorch.device | None
The device on which to perform computations or load tensors and models (default is None). If None,
ARTISTwill automatically select the most appropriate device (CUDA or CPU) based on availability and OS.
Returns
- torch.Tensor
The orientation matrices. Tensor of shape [number_of_active_heliostats, 4, 4].