cancel
Showing results for 
Search instead for 
Did you mean: 

HSO Requirement

backb0ne
Associate II
[VERSION]: MCSDK 6.2.0
 
[TOOL]: MC Workbench
 
[DETAILS]: 
Hi
I want to prototype the HSO algorithm to compare the performance with the current Observer.
From a webinar I have followed last month, the requirement were:
- Analog inputs all 3 motors phase voltages
- analog input for the bus voltage
- 2 ADC (min) in 3 shunt configuration for motor current
- STM32G4
 
I have configured a project based on STM32G474ME
VBUS PC3 ADC1 IN9 
CURRENT_AMPL_U PA0  ADC1 IN1
CURRENT_AMPL_V PC1 ADC1 IN7 
CURRENT_AMPL_W PC0 ADC1 IN6

motorDrives have the following features 
{
          "name": "PhaseVoltageSensing",
          "type": "PhaseVoltageSensing",
          "hwVariants": [
            {
              "type": "ThreePhaseVoltageDividersFiltered",
              "help": "How to enable this variant",
              "signals": {
                "VOLTAGE_DIV_FILT_U": [
                  {
                    "name": "PC4",
                    "help": "",
                    "cost": 0
                  }
                ],
                "VOLTAGE_DIV_FILT_V": [
                  {
                    "name": "PA5",
                    "help": "",
                    "cost": 0
                  }
                ],
                "VOLTAGE_DIV_FILT_W": [
                  {
                    "name": "PA4",
                    "help": "",
                    "cost": 0
                  }
                ]
              },
              "voltageDividerValue": 25.34,
              "cutoffPulse": 3256
            }
          ]
        },
so respectively ADC1IN5, ADC2_IN13, ADC2 _IN17
 
=> The HSO speed sensing mode is not available in MC workbench
 
I have checked the project based on STEVAL-LVLP01 / B-G473E-ZEST1S-B, and all the measurement are also split on two ADC. 
What is incompatible with my configuration ?
 
Thanks.
1 ACCEPTED SOLUTION

Accepted Solutions
cedric H
ST Employee

Hello @backb0ne,

I add a quick look on your stwb6 file.

The issue why you do not see HSO proposed among the Speed Sensing Mode Selection is because of the feature "Phase Voltage Sensing".

This feature is described in your board but the pins connected are the following:

"name": "PC4", -> ADC2

"name": "PA5", -> ADC2

"name": "PA4",-> ADC2

The phase voltage sensing requires at least 2 different ADCs. In your use case only ADC2 is connected.

If you connect one of the 3 signals to an ADC1 pin compatible, then you should see HSO presented by the WB.

Let me know if it is clear and if you succeed to select HSO.

Regards

Cedric

 

 

View solution in original post

6 REPLIES 6
cedric H
ST Employee

Hi @backb0ne ,

Could you attach to your post the json file you wrote?

I will check it for you. From what I can read, you did everything right.

Regards

Cedric

backb0ne
Associate II

Hi @cedric H 

Thanks for looking, really appreciate.

Regards.

cedric H
ST Employee

Hello @backb0ne,

I add a quick look on your stwb6 file.

The issue why you do not see HSO proposed among the Speed Sensing Mode Selection is because of the feature "Phase Voltage Sensing".

This feature is described in your board but the pins connected are the following:

"name": "PC4", -> ADC2

"name": "PA5", -> ADC2

"name": "PA4",-> ADC2

The phase voltage sensing requires at least 2 different ADCs. In your use case only ADC2 is connected.

If you connect one of the 3 signals to an ADC1 pin compatible, then you should see HSO presented by the WB.

Let me know if it is clear and if you succeed to select HSO.

Regards

Cedric

 

 

backb0ne
Associate II

Hi @cedric H 

My mistake !

I also found that 

- voltage measurements have to be on two ADC, AND

- voltage measurement and current measurement of the same phase have to be on different ADC.

If point 2 is not respected, the MCU pin mapping will not show in the speed sensing config tab. MC workbench is not happy but does not give information.

I can generate the HSO code now. Thanks for your help.

 

 

I have an additional question, on the same project,

if HSO is selected, I can individually change the ADC channel of the current sensing (internal or external Opamp).

However, when HSO is not selected,  the ADC channel are grouped, and on current shunt is read by two ADC. But for my project, I have in the second case a warning at code generation: - Main Config : These peripherals still have some not configured or wrong parameter values: [ADC2]

 

 

cedric H
ST Employee

Hi @backb0ne,

The point 2 is a limitation in the MCSDK 6.2.0, and will be remove in the patch release MCSDK 6.2.1 coming out December 13th. 

We know that the MC Workbench is currently not verbose enough. This is a point we will address in the next feature release planed end of March. (6.3.0).

To answer your additional question, in our legacy implementation we sample only 2 phases out of the 3. But to be more accurate, we force the sampling of the 2 phases simultaneously with 2 ADCs. This implies that one of the 2 ADCs must be able to sample 2 phases.

Now, the warning you see on the code generation is an issue we discovered too late to fix it on the 6.2.1. It occurs when we generate a non HSO project with the Hardware Variant ThreeShunt_RawCurrents_Differential_ExternalGain_FilteredADCInput.

Regards

Cedric

 

StefanH
Associate III

I have a BLDC controller / ESC design based on the STM32G473CEU, using in-phase shunts (and an external 50x bi-directional OPAMP). How can I make this design compatible with ZeST and HSO?

Currently the ADCs are used as following:

ADC1: VM / bus voltage; 2 extra (low speed) voltage inputs and several NTCs

ADC2: Phase A voltage & Current

ADC3: Phase B voltage & Current

ADC4: Phase C voltage & Current


Would above setup work? If not, what should be changed?

What about filtering?
VM currently has a fixed first-order low pass filter set at 1.5kHz cut-off. Which cut-off frequency would be suitable?

The phase current and voltage use a similar low-pass filter, but include an analog switch to enable extra capacitance. Their cut-off frequency is ~12kHz and 150kHz depending on the switch state (current and voltage can be switched as separate groups). Are these suitable?

Is there an application note or hardware design manual for these algorithms?