-
-
Notifications
You must be signed in to change notification settings - Fork 1
Angle unit
Angular unit consists of three elements: angular sensor, oscillator board and sensor board. This topology is equal for all series of stations: 400, 500, 4000 and 600.
This board is the least interesting. It creates excitation signal for angular sensor.
This sensor is actually "resolver". Pickup inductor rotating in magnetic field generated by two inductors 90 degrees phase shifted. Excitation enegry is created on oscillator board. Pickup inductor is actually 2 inductors 90 degrees phase shifted. First inductor creates "sine" signal, second inductor creates "cosine" signal. Signal is picked up and processed by the sensor board.
To make this sensor more precise, it is divided into sectors. Each sector is 45 degrees - total of 8 sectors.
Sensor board picks up signal from sensors and digitizes it into numbers using ADC (analog to digital converter).
There are 3 sensors: 2 angular sensors and compensator.
400 series uses main CPU to process the sensor data. While other, newer models, use dedicated mcu to process data and calculate math over the numbers.
Board on these series is very stupid. CPU on main board shifts data into shift registers to set the analog and digital multiplexers and after ADC conversion is finished data is read from the board by shifting from shift registers.
In software this is done in NMI interrupt routine. This routine is executed periodically by triggering external NMI pin.
These stations moved the burden of constant ADC processing into separate MCU. MCU is 8051. It communicates with the station over 3wire gdm protocol.
On startup the angular unit does not contain any coefficients for the angular sensor. Each sensor is calibrated in factory and data is written into stations memory. On power on station will upload coefficients into sensor board and read sensor boards serial number.
Angular unit can operate in multiple modes. If station needs only compensator values, it will not gather information from angle sensors. If station needs all 3 sensor values, it will do conversion on all sensors. This mode is selected according to program station is in.
400 angular unit/software routine can work in 3 modes: compensator only, HA angle + compensator, VA + HA + compensator
500 and newer angular unit have same possibilities and since the station doesn't have access to the raw values from sensors, there are modes to transfer this data as well.
On 400 series data is put into buffer, that is read between each process function executions. Data in buffer is pairs of: label and value. All sensor labels are at the same time to provide consistent results.
On newer versions this same system is used, but the buffer of label-value pairs is filled by interrupt routine that handles communication between angular unit and main board. Communication uses proprietary GDM protocol.
Math in all stations is the same. On 400 series it is written using proprietary 6byte long number format (we call it 6num) and on newer stations this is using 4byte integers, but threated as fixed-point numbers in Q2.14 format.
Math is using resolver angle calculation (atan2) with multiple calibration coefficients to fix skew of the cosine and sine signal.
On 400 station raw data comes from labels 113,114,115,116,117,118,119. 113, 114 are sectors codes for horisontal and vertical sensors respectively. 115,116 and 117,118 are sin and cos signal pairs for horisontal and vertical sensors. Label 119 is offset value.
Resolver data needs to be normalized. First raw value is converted into voltage by dividing by 10000. Next label data is normalized according to following formulae:
During this step array is precomputed for faster coefficient application. Calculated array is:
Angle is calculated using atan2 function. This function first checks quadrant of the resulting angle. Then it calculates atan(y/x) function using polynomial approximation. And as last step it applies quadrant correction.
Angle is normalized to 0-400 gons after this step.
Sector code is looked up in table. Angle from previous step is scaled down by 8 and sector angle is added. 8 is the number of sectors.
_TODO: here be sector code to angle table
Angle is normalized to 0-400 gons after this step.
Calibration coefficients are triplets. For normal calibration there are 6 coefficients and for precise calibration there are 12 coefficients. For each triplet following formula is applied:
This term is very similar to one used in step 4.
Step 3 and 4 compute inverse Fourier transform. Calibration coefficients are Fourier transform coefficients.
Step 7 calculates very similar math as step 3. It uses only some coefficients calculated from Fourier transform. We think that this might be the most significant coefficients.
bla bla .. work in progress...