In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to understand the principle of Svpwm". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to understand the principle of Svpwm".
SVPWM
SVPWM is the abbreviation of space vector pulse width modulation (Space Vector Pulse Width Modulation), which is usually composed of six power switches of a three-phase inverter. After a specific timing and commutation, the final output waveform may be very close to the ideal sinusoidal waveform. As shown in the following figure, the left side is the complex plane, that is, the space vector, and the right side is the sinusoidal waveform in the time domain.
IQMATH
TI film is very fragrant, control, TI is undoubtedly one of the best solutions, relatively speaking, the data is also very complete; in addition, TI for no floating-point calculator for fixed-point DSP launched IQMATH library, in the use of Q format for data analysis and processing process, very convenient, the code has become more concise, this paper will use the SVPWM algorithm provided by TI based on STM32 platform to achieve SVPWM modulation.
Test platform parameters: hardware: stm32f103 software: standard peripheral library 3.5IDE:MDK-ARM
IQmathLib
This article uses the Cortex-M3 version of IQMathLib, which makes it more convenient and efficient to unify the data in Q format for fixed-point MCU without floating-point processors.
First of all, decompress the IQmathlib to get the following files, which contain static libraries under each platform. This paper uses STM32F1 to develop in the keil environment, and needs to use rvmdk-cm3.
Open a keil project and click the icon shown below in the menu interface to enter project items
Add an IQmath group, and add static libraries and header files under the rvmdk-cm3 path
Click the icon shown below to enter the familiar settings of the project.
Add the path to the rvmdk-cm3 static library and the include path to the header file, as shown in the following figure
In the end, the whole project can be build.
Test part of the program
/ * * # include "stm32f10x.h" # include # include # include "serial_scope.h" # include "common.h" # include "IQmathLib.h" # include "usart_driver.h" # include "clarke.h" # include "park.h" # include "svpwm.h" / * * @ brief Main program. * @ param None * @ retval None * / sv_mod_t svpwm = SVGEN_DEFAULTS; # define CLARK 0 # define PARK 1 # define SVPWM 2 # define SVPWM_REG 3 int main (void) {int user_data [4] = {0}; static int16_t time_cnt = 0; Trig_Components a; Trig_Components b; _ iq final_angle; usart_init (); while (1) {time_cnt-=32 Clarke_parameter.As = _ IQsinPU (time_cnt); clarke_parameter.Bs = _ IQsinPU (time_cnt-0x5555); if (clarke_parameter.As > 32767) {clarke_parameter.As = 32767;} if (clarke_parameter.As)
< -32768){ clarke_parameter.As = -32768; } if(clarke_parameter.Bs >32767) {clarke_parameter.Bs = 32767;} if (clarke_parameter.Bs <-32768) {clarke_parameter.Bs =-32768;} clarke_calc (& clarke_parameter); park_parameter.Alpha = clarke_parameter.Alpha; park_parameter.Beta = clarke_parameter.Beta; park_parameter.Sin = trig_functions (time_cnt) .hsin; park_parameter.Cos = trig_functions (time_cnt). Hcos Park_parameter.Angle =-time_cnt; park_calc (& park_parameter); svpwm.Ualpha = clarke_parameter.Alpha; svpwm.Ubeta = clarke_parameter.Beta; svpwm_calc (& svpwm); # define FOC_DEBUG SVPWM_REG # if (FOC_DEBUG = = CLEAK) user_data [0] = clarke_parameter.As; user_data [1] = clarke_parameter.Bs; user_data [2] = clarke_parameter.Alpha User_data [3] = clarke_parameter.Beta; # elif (FOC_DEBUG = = PARK) user_data [0] = clarke_parameter.As; user_data [1] = clarke_parameter.Bs; user_data [2] = park_parameter.Ds; user_data [3] = park_parameter.Qs; # elif (FOC_DEBUG = = SVPWM) user_data [0] = (uint16_t) svpwm.Ta; user_data [1] = (uint16_t) svpwm.Tb User_data [2] = (uint16_t) svpwm.Tc; user_data [3] = svpwm.VecSector*5000; # elif (FOC_DEBUG = = SVPWM_REG) / / the value of the converted CCRx register sv_regs_mod_t sv_regs = svpwm_get_regs_mod (7200 Mastersvpwm); user_data [0] = sv_regs.ccr1; user_data [1] = sv_regs.ccr2; user_data [2] = sv_regs.ccr3 User_data [3] = svpwm.VecSector*1000; # endif SDS_OutPut_Data_INT (user_data);} return 0;}
Finally, the Ta,Tb,Tc of the serial port graphical software is output through the serial port, as shown in the following figure
With regard to the configuration of STM32, you need to configure three complementary PWM waveform outputs; for example, the three PWM outputs of CH1,CH2,CH3 with TIM1 are configured, and then you can assign the value of Ta,Tb,Tc to CCR1,CCR2,CCR3 respectively.
The details are shown in the following figure; on the left is the vector synthesis dynamic diagram of the complex plane; on the right is the comparative state of the three PWM output channels
Switching state
Attachment
Thank you for your reading, the above is the content of "how to understand the principle of Svpwm". After the study of this article, I believe you have a deeper understanding of how to understand the principle of Svpwm, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.