ID 683072
Date 7/26/2023
Public
Give Feedback

## 5.2. Signal Scaling in the Software of the Drive-on-Chip Design Example

The software performs scaling to:
• Normalize sigma-delta and ADC samples for use in the FOC algorithm
• Apply zero offsets
• Position feedback scaling

Figure 19. Signal Scaling ArchitectureThis figure shows a simplified block diagram of the scaling in the software application supporting the Tandem Motion-Power 48 V Board.

### Scaling of Motor Phase Current Samples

The design treats motor phase current samples as dimensionless numbers in the FOC algorithm, rather than real current measurements.

To compensate for the differences in signal conditioning between the different ADCs, the design scales Intel® MAX® 10 ADC samples as it reads them from the ADC to normalize them to represent the same physical quantity as the sigma-delta ADC samples.

To compensate for the differences in signal conditioning between the different ADCs, the design scales any other ADC samples as it reads them from the ADC to normalize them to represent the same physical quantity as the sigma-delta ADC samples.

Table 7.  Scaling of Intel® MAX® 10 Motor Phase Current SamplesThis table shows the ADC responses for the motor phase currents and the scaling applied to the Intel® MAX® 10 ADC samples to normalize them to the Sigma-Delta samples. The scaling is also shown with a power-of-2 divisor to simplify integer arithmetic.
Item Sigma-Delta Intel® MAX® 10
Motor Phase Currents 1024 counts/A 81.9 counts/A
Scaling 1 1024/81.9 or 12803/1024

### Calculation of Zero Offsets

Offset errors arise in the ADC conversion process from a number of factors, including

• Component tolerance in sense circuits
• Offsets in sense amplifiers
• Errors in Vdd supply to sense amplifiers and ADCs
• Offsets in the ADC converters
Offsets are most noticeable when converting low level signals where they lead to a larger error in percentage terms. For the most crucial feedback, the design attempts to calculate and correct for the offsets.

### Motor Phase Current Zero Offset

The design calculates the zero offset for the motor phase current during startup. the design samples several conversions while no motor current is flowing. The design averages the samples to calculate the offset. It applies them as a correction to the offset register in the sigma delta ADC module

### Inductor Current Zero Offset on Tandem Motion Power Board

You cannot shut off the current flow through the DC-DC inductors. The design calculates approximate offsets from the average of the offsets previously calculated for the motor phase currents. The design applies power to all the converters from the same Vdd supply and in the same ambient surroundings.