We are presently working on V/f control of inverter using space vector PWM technique. Along with that I am reading and calculating RMS values Line to Line voltages and line currents. I am even calculating the mean values of DC bus and DC current.
We are using XMC4400 F100X256 with P14.6, P14.7,P14.8 for line currents sensing, P14.9,P14.12, P14.13 for the line to line voltages sensing, P15.2, P15.3 for half DC bus sensing and P15.8 for DC current sensing.
The space vector PWM is generated using 2 PWM_CCU8 APPs operating in center aligned mode. I am updating the timing for each sample in space vector, using the event form compare 2 match while counting down(By setting the unused compare 2 register as least compare value possible). The SPACE VECTOR PWM is working fine and giving desired results.
Now I am using 4 ADC_MEASUREMENT_ADV APPs in SCAN SOURCE MODE for measuring since channels are in different ADC groups (P14.6, P14.7 in GROUP -0, P14.8 , P14.9,P14.12,P14.13 in GROUP -1, P15.2,P15.3 in GROUP-2 and P15.8 in GROUP-3). For 3 cycles of the centre aligned clock of PWM_CCU8 APP I am taking 1 sample of all these measurements. With 1st Timing cycle taking sample of all the line to line voltages, in the 2nd cycle the DC voltage and DC current and in the 3rd Timing cycle taking sample of all the line currents. I am triggering the ADC conversion of each group using software. I am generating a result event using the last channel of each group. With the interrupt service routine I am performing RMS values calculations. As of now I am assuming 50Hz frequency of the AC signals measured. So while calculating RMS values the number of samples taken over each cycle is 66 (For a switching frequency in Space vector as 9900Hz).
The Space vector PWM is working fine and output is also tested in hardware. But When I am trying to measure the line voltages and watch the corresponding expression in DAVE the line voltages and Total DC bus is coming correctly. But the Line currents, Positive DC bus voltage and DC bus current are showing same incorrect value over and over again even when I change the parameters. I have been playing around in DAVE trying all possible settings without any form of success. Also been reading the Device Guide for the ADC, but it has not brought me any closer.
Any suggestions, comments or help is welcome!
We are using XMC4400 F100X256 with P14.6, P14.7,P14.8 for line currents sensing, P14.9,P14.12, P14.13 for the line to line voltages sensing, P15.2, P15.3 for half DC bus sensing and P15.8 for DC current sensing.
The space vector PWM is generated using 2 PWM_CCU8 APPs operating in center aligned mode. I am updating the timing for each sample in space vector, using the event form compare 2 match while counting down(By setting the unused compare 2 register as least compare value possible). The SPACE VECTOR PWM is working fine and giving desired results.
Now I am using 4 ADC_MEASUREMENT_ADV APPs in SCAN SOURCE MODE for measuring since channels are in different ADC groups (P14.6, P14.7 in GROUP -0, P14.8 , P14.9,P14.12,P14.13 in GROUP -1, P15.2,P15.3 in GROUP-2 and P15.8 in GROUP-3). For 3 cycles of the centre aligned clock of PWM_CCU8 APP I am taking 1 sample of all these measurements. With 1st Timing cycle taking sample of all the line to line voltages, in the 2nd cycle the DC voltage and DC current and in the 3rd Timing cycle taking sample of all the line currents. I am triggering the ADC conversion of each group using software. I am generating a result event using the last channel of each group. With the interrupt service routine I am performing RMS values calculations. As of now I am assuming 50Hz frequency of the AC signals measured. So while calculating RMS values the number of samples taken over each cycle is 66 (For a switching frequency in Space vector as 9900Hz).
The Space vector PWM is working fine and output is also tested in hardware. But When I am trying to measure the line voltages and watch the corresponding expression in DAVE the line voltages and Total DC bus is coming correctly. But the Line currents, Positive DC bus voltage and DC bus current are showing same incorrect value over and over again even when I change the parameters. I have been playing around in DAVE trying all possible settings without any form of success. Also been reading the Device Guide for the ADC, but it has not brought me any closer.
Any suggestions, comments or help is welcome!