cancel
Showing results for 
Search instead for 
Did you mean: 

HSO Profiler fail with ERROR_DC_AC based on customer board

ZHOUXIANG
Associate II

Hi,

 I designed a custom inverter, based on G473VE, external amplifier and compare, use TIM8 to generate PWM wave, use IR2101S to drive MOSFET. When I try to profile the motor(based on HSO), I get the error: ERROR_DC_AC. 

I have upload the screenshot(90e0d582f6e2fb5d5043ff325aab241.png), stwb6 file(MCV1_HSO_PROFILE.rar) and schematic files(MC_V1.pdf). Could you help me please? Thanks a lot!

I have tried frequency from 20hz to 100hz, and power from 2w to 5w. but no use...

ZHOUXIANG_0-1747727348087.png

 

8 REPLIES 8
ZHOUXIANG
Associate II

Is this error caused by the negetive Ls? I have used PLL to profile the same motor, the Ls is about 0.55mH. 

ZHOUXIANG_0-1747727177385.png

 

Hello ZHOUXIANG,

Have you tried to look at the current waveforms via Datalog ? Is everything behaving correctly ? Can you send pictures please ?
You could also have a look at Open Loop currents.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

ZHOUXIANG_0-1747974848421.png

phase voltage and current when profiling(above)

for power of phase U, 2.5A*0.36V=0.9w, for power of phase V and W, both seem to be half of phase U, so the total power is about 2w. It seems to be right.

ZHOUXIANG_1-1747974901971.png

phase voltage and current when "open loop current"(above)

I zoom in the Y scale, I can see many peek on current, but very very week near zero.

Then, I measure the current on Rshunt by multimeter, about 1.2A, not 2.5A, this is weird. I am trying to check this.

Also, I measure the phase voltage of U, the value is about 10.5V before starting profile, and raise up to about 10.8V during profile, 10.8-10.5=0.3V  vs  0.36V above, that seems right.

Finally, I check the profile result, Rs is about 0.2 Ohm, but 0.36V/2.5A=0.14 Ohm, this is weird again.

I still do not know much about HSO, so I need more advise and notice. Thanks a lot!

I check current sensing setting, are there some wrong below?

ZHOUXIANG_0-1748089114899.png

ZHOUXIANG_1-1748089134987.png

ZHOUXIANG_2-1748089150117.png

 

ZHOUXIANG_3-1748089625095.png

M1_MAX_READABLE_CURRENT is OK, but M1_MAX_READABLE_CURRENT do not have /2, just ADC_REFERENCE_VOLTAGE. please help me check the setting, thanks a lot.

 

According to the datalog above, the phase voltage seems ok, but the phase current is not. I check the related code, found something below:

I use cubemonitor to trace some values in function OVERSAMPLING_getMeasurements

ZHOUXIANG_0-1748746583155.png

I check 3 points and get different results.

ZHOUXIANG_1-1748746593083.png

ai = (aovs*acf)>>16 =  (50400 * (-268435456))>>16 = -13,529,146,982,400 >> 16 = -206,438,400 ≠ -206503936. 

ZHOUXIANG_2-1748747108564.png

ai = (aovs*acf)>>16 =  (50384 * (-268435456))>>16 = -13,524,852,015,104 >> 16 = -206,372,864 == -206372864.

ZHOUXIANG_3-1748747259355.png

ai = (aovs*acf)>>16 =  (50480 * (-268435456))>>16 = -13,550,621,818,880 >> 16 = --206,766,080 ≠-206635008.

what's wrong? 

ZHOUXIANG
Associate II

@Gael A I check the current wave of phase U again, the current seems OK.

ZHOUXIANG_0-1749107326424.png

ZHOUXIANG_1-1749107338491.png

Rshunt Voltage of phase U = (1.65-1.24)/15= 27mV ≈ 26mV

Current of phase U = 27mV/10mΩ = 2.7A

ZHOUXIANG_2-1749107595370.png

The datalog indicate that current of phase U is about 2.58A. Everything seems OK.

ZHOUXIANG_3-1749107737701.pngZHOUXIANG_4-1749107807360.png

Also, I check the OpenLoop Current, it is OK. So, what else can I do now?

 

 

Do you have any ideas about this issue? I am going to give up the HSO.

Gael A
ST Employee

Hello ZHOUXIANG,

On your latest datalog screenshot, I cannot see any current flowing, is this intended behaviour ?
Also, surely you will understand that we cannot provide support on custom boards, so you will have to check your settings and hardware by yourself. 

Concerning the current's behaviour, could you do the following experiment :

- Switch to Open Loop Duty
- Input a small percentage value, with a small rotation speed value and try to find a setting that makes your motor work
- Have a look at Ialpha and Ibeta using Datalog, and extract a picture in XY plot.

If this works, you can switch to OpenLoopCurrent, and see for all three phases if the level of current is correct. (0°, 120° and 240°). Please rapidly tune your current PID before doing this. You can also try using the profiled values from the Legacy Profiler and generate an HSO project that way to have a guess on your current PID.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.