Preface
This chapter uses a constant voltage-frequency ratio open-loop control method to drive the rotation of a permanent magnet synchronous motor. First, the control principle of the constant voltage-frequency ratio is analyzed, and then a simulation analysis of the constant voltage-frequency ratio open-loop control system of the permanent magnet synchronous motor is performed in Matlab/Simulink. Finally, the constant voltage-frequency ratio control algorithm generated code in Simulink is loaded into the actual project for engineering implementation.
1. Constant voltage-frequency ratio (V/F) control principle
The constant voltage-frequency ratio control method of permanent magnet synchronous motor is similar to the constant voltage-frequency ratio control method of asynchronous motor, which also controls the motor input voltage and frequency to change simultaneously, so as to keep the air gap flux constant. This control method does not have the feedback of physical quantities such as motor current, voltage, position, etc., and has poor dynamic performance. It is easy to cause loss of step and oscillation when the given target speed changes or the load changes suddenly. However, this control method is simple and is mostly suitable for occasions where the speed accuracy requirement is not high.
The Matlab/Simulink simulation block diagram of the permanent magnet synchronous motor constant voltage-frequency ratio open-loop control system is as follows:
2. Matlab/Simulink simulation analysis of permanent magnet synchronous motor constant voltage-frequency ratio open-loop control system
2.1. Simulation circuit analysis
2.1.1. Constant voltage-frequency ratio control algorithm
Constant voltage-frequency ratio control algorithm: The conversion relationship between the speed and frequency of a permanent magnet synchronous motor is as follows:
First, the motor target speed is converted to frequency using the above formula. Since the open-loop control system does not automatically limit the starting current, a ramp function is added to make the frequency change smoothly. For example, the target speed set in the simulation is 1200r/min, and the process of converting it to frequency is shown in the figure below:
Then, the constant voltage-frequency ratio V/F control algorithm characteristics (as shown in the figure below) make the input voltage change synchronously with the frequency, so as to keep the air gap flux constant. At low frequencies, both Us and Eg are small, and the stator resistance and leakage inductance voltage drop account for a significant proportion and can no longer be ignored. At this time, the stator voltage is artificially raised to approximately compensate for the stator impedance voltage drop, as shown in line b of the figure below:
From the above figure, we can see that the relationship between input voltage and frequency is (line b with low-frequency compensation, given (0, U0) (f1N, UsN)):
Convert the frequency to voltage using the above formula, and calculate the rated frequency f1N (the relationship between the speed and frequency of a permanent magnet synchronous motor) from the rated speed of the motor. The constant voltage-frequency ratio control of the permanent magnet synchronous motor is speed regulation below the base frequency, and the maximum frequency of the system cannot exceed the rated frequency f1N. For example, the rated speed of the permanent magnet synchronous motor selected in the simulation is 12540r/min, and the calculated rated frequency f1N is 1463Hz, which is the maximum set frequency of the system.
The target speed is set to 1200r/min, the speed is converted to frequency, and then the change in input voltage is obtained from the change in frequency, as shown in the following figure:
A normalization process is performed here, dividing the voltage change by the rated voltage of the motor so that the output voltage range falls within the [0,1] interval.
Convert the frequency to angular velocity, and then integrate the angular velocity to get the current angle, as shown in the following figure:
At this time, the input voltage amplitude Um and phase angle wt have been obtained, and then the voltage representation of the amplitude and phase angle is converted into the voltage representation in the two-phase αβ coordinate system by the following formula:
The voltage in the αβ coordinate system is expressed as:
Then, the inverse Clark transformation is used to obtain the final three-phase voltage input to the motor:
2.1.2. Output processing
The output voltage of the constant voltage-frequency ratio control algorithm is processed so that it falls within the range of [0,1]:
2.1.3. Main circuit
The main circuit includes an inverter circuit and a permanent magnet synchronous motor. The inverter circuit is shown in the figure below. The Average-Value Inverter module is used to directly generate a three-phase sinusoidal voltage. The figure below shows the voltage waveform input to the motor at a target speed of 1200r/min.
The permanent magnet synchronous motor uses a BR2804-1700 motor (the motor parameters are measured using ST Motor Proflier), the parameters are as follows:
2.2. Analysis of simulation results
2.2.1. Set the target speed to 1200r/min
Waveform curve of target speed and actual speed:
In steady state, the error between the target speed and the actual speed is:
In steady state, the motor stator current is:
Motor rotor position:
Stator current value in dq coordinate system:
Electromagnetic torque:
2.2.1. Set the target speed to a variable value
Target speed:
Target speed and actual speed:
It can be seen from the figure that there is a ramp time for motor acceleration and deceleration. The speed of motor acceleration and deceleration is related to the slope of the ramp function set when converting the speed to frequency in the constant voltage-frequency ratio control algorithm.
3. Code Generation and Engineering Implementation of Constant Voltage-Frequency Ratio Open-Loop Control System for Permanent Magnet Synchronous Motor
3.1. Functional requirements
Realize constant voltage-frequency ratio control of permanent magnet synchronous motor, and adjust the speed of permanent magnet synchronous motor by pressing buttons.
3.2 Hardware Design
Control board: STM32F302R8
Driver board: X-NUCLEO-IHM07M1
Permanent magnet synchronous motor: BR2804-1700
3.3. Software Design
3.3.1.STM32CubeMX bottom-level configuration
1. RCC settings external HSE (Crystal/Ceramic Resonator), clock set to 72MHz
2. PC10, PC11, and PC12 are set to push-pull output, no pull-up and pull-down resistors, and high speed, and the initialization state is set to 0; PB13 is set to push-pull output, pull-down resistor, high speed, and the initialization state is 0; PC13 is set to input, without pull-up and pull-down resistors.
3. Set the TIM1 clock source to the internal clock, TIM1_CH1 (PA8) to PWM output, TIM1_CH2 (PA9) to PWM output, and TIM1_CH3 (PA10) to PWM output; set the TIM1 prescaler value to 3-1, select the counting mode as central counting mode 1, and set ARR to 1200-1 (1/(1/(72000000/3))*1200=20KHz), and the internal clock has no frequency division; enable TIM1 update interrupt, and set the interrupt priority to (1,0)
4. USART2 is set to asynchronous, 115200 baud rate, 8 data bits, no parity bit, 1 stop bit
5. Project Manager->Project name+IDE configuration, Code Generator configuration, generate project code
3.3.2. Interface development between application layer and bottom layer
Speed_Ref is used to set the target speed; Duty[3] is used to receive the three-phase voltage generated by the constant voltage-frequency ratio control algorithm. The three-phase voltage is used as the modulation wave, and the TIM1 counter (central counting mode) is used as the carrier. The frequency of 20KHz is consistent with the Simulink simulation design. The modulation wave and the carrier are modulated to generate PWM to control the drive output of the three-phase inverter circuit. Here, the SPWM control method is used for control; Vmin is used to set the compensation voltage value U0 in the constant voltage-frequency ratio control algorithm.
3.3.3.Matlab/Simulink Constant Voltage-Frequency Ratio Control Algorithm Code Generation
3.3.4. Code integration between application layer and underlying layer
Call in the main function: PMSM_VF_initialize() initialization function.
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
uint8_t count = 0;
/* USER CODE END 1 */
/* MCU Configuration------------------------------------------------- ----------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_TIM1_Init();
MX_USART2_UART_Init();
/* USER CODE BEGIN 2 */
PMSM_VF_initialize(); //Simulink initialization function
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
if(Key_Scany(KEY_GPIO_Port,KEY_Pin)==1)
{
HAL_GPIO_WritePin(GPIOC, EN1_Pin|EN2_Pin|EN3_Pin, GPIO_PIN_SET); //Enable three-phase bridge arm
HAL_TIM_PWM_Start(&htim1,TIM_CHANNEL_1); //Enable three-channel PWM
HAL_TIM_PWM_Start(&htim1,TIM_CHANNEL_2);
HAL_TIM_PWM_Start(&htim1,TIM_CHANNEL_3);
__HAL_TIM_ENABLE_IT(&htim1,TIM_IT_UPDATE); //Enable TIM1 update interrupt
Previous article:Matlab/Simulink simulation analysis of permanent magnet synchronous motor constant voltage-frequency ratio open-loop control system (Part 2)
Next article:How to correctly connect PLC to peripheral devices
Recommended ReadingLatest update time:2024-11-16 09:29
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How to configure the pins used by LCD as GPIO?
- 【GD32E231_DIY】②DS1302 real-time clock module information
- Like this BOOST boost topology, if a lithium battery 4.2V & 1000mA is used, the load current is a momentary signal (no need to...
- ASM330LHH automotive 6-axis inertial module data sheet, application notes, driver code, schematic library, PCB library
- Development board based on TI AM5728 (floating point dual DSP C66x + dual ARM Cortex-A15)
- Agitek High-tech Joint Electronics Laboratory fully supports the National Undergraduate Electronics Design Competition
- Signals and Systems (3rd Edition)
- Can a 100A current flow through a PCB? Tips for setting up high current paths
- hcnr201 isolation circuit problem
- recruitment