2.2.3.2 Setting Analog Interface

Field-Oriented Control (FOC) involves controlling the stator currents of a motor to produce a rotating magnetic field, which in turn controls the rotor's position and speed. For more details, refer to Field Oriented Control.

Proper configuration of the analog interface settings is crucial for the effective implementation of FOC. Harmony QSpin allows users to configure these analog interface channels in just a few steps.

Analog Signal Groups

The analog signals interfaced with the system are categorized into two main groups:

  1. Group 01: Phase A and Phase B current.
  2. Group 02: DC bus voltage and potentiometer signal.

QSpin allows users to select the ADC instance and channel for each signal, with a forced 12-bit resolution and backend interrupt settings optimized for FOC (Field-Oriented Control) operation.

If a different resolution is required, users can manually configure the settings through the ADC H (Peripheral Library Interface).

The following section provides a detailed guide on how to properly set up these signals, including descriptions of the different fields and configuration options.

Analog Interface Graphical User Interface

The graphical user interface for the analog signal setup is displayed as follows:

Steps for Signal Setup

To correctly set up the analog signals, follow these steps:

  1. Select Group 01 signals block to configure phase A and phase B currents analog interface
  2. Set the fields for Phase A and Phase B current as per your project requirements.
    FieldDescription
    Signal NameIA (Phase A current tag)
    ADC unitSelect the ADC instance for Phase A current
    ADC channelSelect the ADC channel for Phase A current
    Signal NameIB (Phase B current tag)
    ADC unitSelect the ADC instance for Phase B current
    ADC channelSelect the ADC channel for Phase B current
  3. Select Group 02 signals block to configure DC bus voltage and potentiometer analog interface
  4. Set the fields for DC bus voltage and the optional potentiometer as per your project requirements.
    FieldDescription
    Signal NameVDC (DC bus voltage tag)
    ADC unitSelect the ADC instance for DC bus voltage
    ADC channelSelect the ADC channel for DC bus voltage
    Signal NameVPOT (Potentiometer signal tag)
    ADC unitSelect the ADC instance for the potentiometer
    ADC channelSelect the ADC channel for the potentiometer