control_system
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
control_system [2019/12/01 07:46] – [Outputs] graf | control_system [2023/05/11 17:13] (current) – [Motor Model] ursgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Control System ====== | ====== Control System ====== | ||
+ | |||
+ | The coordinate system is as follows | ||
+ | [{{ : | ||
+ | In z direction, positive values move the TCP upwards. | ||
+ | \\ | ||
+ | |||
The figure below shows the complete control system for our delta roboter. | The figure below shows the complete control system for our delta roboter. | ||
- | {{: | + | {{: |
==== Inputs ==== | ==== Inputs ==== | ||
- | Lets start with the blue box at the bottom center of the diagram. This box represent the motors including the gears and the encoders. The encoders are defined as //Peripheral Input//. This //Peripheral Inputs// are described in the HAL configuration file, see [[hal|]]. To initialize the encoder inputs, you have to call the constructor of the //Peripheral Input// and add the respective | + | Lets start with the blue box at the bottom center of the diagram. This box represent the motors including the gears and the encoders. The encoders are defined as '' |
<code c> | <code c> | ||
- | eeros:: | + | eeros:: |
</ | </ | ||
- | If the HAL is configured correctly, we get the current position in radian of each encoder. Next, the //Mux// collects the three encoder values and puts them into an '' | + | If the HAL is configured correctly, we get the current position in radian of each encoder. Next, the '' |
<code c> | <code c> | ||
using AxisVector = eeros:: | using AxisVector = eeros:: | ||
</ | </ | ||
+ | The mouse delivers a signal with four dimensions. As we do not use the fourth dimension (additional wheel would be necessary) we have to reduce the mouse signal to three dimensions with a special block. At the same time this block swaps x and y axis in order to adapt to the axis setup of the robot. | ||
Line 26: | Line 33: | ||
* The '' | * The '' | ||
- | ==== Headline ==== | + | You have to make sure, that the path planner delivers a path with a acceleration and velocity which can in fact be achieved by the robot. If not, the arm might move in unpredictable ways. That is, moving from e.g. 0/5 to 5/5 must be made in a straight line. |
- | The "Motor Model" | + | ==== Controller ==== |
- | The " | + | |
+ | The position of the TCP is controlled by taking in the setpoint (see above) and adding planned velocities and accelerations. The resulting total acceleration is then fed into the block ' | ||
+ | |||
+ | ==== Motor Model==== | ||
+ | As our board cannot only control voltages fed to each motor, we must use a motor model to calculate these voltages. The block 'Motor Model' | ||
+ | < | ||
+ | U = kM * w + I * RA + dI/dt * L | ||
+ | </ | ||
+ | with I = M / kM and dI/dt * L beeing very small with our motors and accounting for the gear i we get | ||
+ | < | ||
+ | U = kM * w * i + M * RA / (kM * i) | ||
+ | </ | ||
==== Outputs ==== | ==== Outputs ==== | ||
The drive signals to the motor are of type '' | The drive signals to the motor are of type '' | ||
+ | <code c> | ||
+ | eeros:: | ||
+ | </ | ||
+ | |||
+ | The block ' |
control_system.1575182788.txt.gz · Last modified: 2019/12/01 07:46 by graf