# Machinekit Documentation

## HAL Component — CLARKE2

### INSTANTIABLE COMPONENTS — General

All instantiable components can be loaded in two manners

Using **loadrt** with or without *count=* | *names=* parameters as per legacy components

Using **newinst**, which names the instance and allows further parameters and arguments

primarily *pincount=* which can set the number of pins created for that instance (where applicable)

### NAME

#### clarke2 — Two input version of Clarke transform

### SYNOPSIS

**clarke2**

### USAGE SYNOPSIS

**loadrt clarke2**

OR

**newinst clarke2 <newinstname>** [ **pincount**=*N* | **iprefix**=*prefix* ] [**instanceparamX**=*X* | **argX**=*X* ]

( args in [ ] denote possible args and parameters, may not be used in all components )

### DESCRIPTION

The Clarke transform can be used to translate a vector quantity from a three phase system (three components 120 degrees apart) to a two phase Cartesian system. .P \fBclarke2\fR implements a special case of the Clarke transform, which only needs two of the three input phases. In a three wire three phase system, the sum of the three phase currents or voltages must always be zero. As a result only two of the three are needed to completely define the current or voltage. \fBclarke2\fR assumes that the sum is zero, so it only uses phases A and B of the input. Since the H (homopolar) output will always be zero in this case, it is not generated.

### FUNCTIONS

**clarke2.N.funct**
( OR
**<newinstname>.funct** (requires a floating-point thread) )

### PINS

**clarke2.N.a** float in ( OR
**<newinstname>.a** float in )

**clarke2.N.b** float in ( OR
**<newinstname>.b** float in )
- first two phases of three phase input

**clarke2.N.x** float out ( OR
**<newinstname>.x** float out )

**clarke2.N.y** float out ( OR
**<newinstname>.y** float out )
- cartesian components of output

### SEE ALSO

\fBclarke3\fR for the general case, \fBclarkeinv\fR for the inverse transform.

### LICENCE

GPL