Playing control with STM32F407 - automatic tuning of PID parameters using relay feedback method

Publisher:乡村乐园Latest update time:2018-10-20 Source: eefocusKeywords:STM32F407 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The principle of automatic PID parameter tuning by relay feedback method is shown in Figure 1 and Figure 2 (see Astrom "Adaptive Control"). There is also a literature called limit cycle method PID parameter automatic tuning. In Figure 1, when the system tuning switch is cut to the T position, due to the relay characteristics, the system is forced to oscillate. By measuring the oscillation period Tu and the system gain Ku, the PID parameters can be determined. Specifically, Ku=4*d/(π*a), where a is the amplitude of the first harmonic component of the system output, and d is the output amplitude of the relay characteristic link. At this time, the PID parameters can be set as: Kc=0.6*Ku, Ti=0.5*Tu, Td=0.125 *Tu, when the system is disturbed, it is better to use a relay link with hysteresis characteristics to overcome the influence of the interference. The relevant calculation formula remains unchanged. The automatic tuning effect of the PID parameters of the relay feedback method is shown in Figure 3. When the system is in the automatic tuning state, if pv>=sp+h, the relay link outputs MP0-d, otherwise when pv<=sp-h, the relay link outputs mp=MP0+d, where MP0 is the steady-state value. This forces the system to oscillate. It can be seen that the control effect after tuning is still quite good.

Next, we reverse the setting accuracy, Ku=Kc/0.6=0.739926/0.6=1.23321, Tu=2*Ti=2*165=330sec, a==4*d/(π*Ku)=4*0.05/(pi*1.23321)=0.051623, in the description function method, the description function of the relay link is G(jω)=-1/N, where N=4*d/(π*a)*exp(-j*arcsin(h/a)), so Gp(jω)=-1/N, solve this equation to get Tu and a, we use MATLAB code to solve this equation to get Tu =352.7039, a=0.0465, which has a certain error from the actual value. There are many reasons for the error, including numerical calculation error, approximation of the amplitude of the first harmonic component, delay in data exchange, time base error caused by inaccurate crystal oscillator, quantization error, non-true real-time simulation, etc.

Playing control with STM32F407 - automatic tuning of PID parameters using relay feedback method

Playing control with STM32F407 - automatic tuning of PID parameters using relay feedback method

Playing control with STM32F407 - automatic tuning of PID parameters using relay feedback method


Keywords:STM32F407 Reference address:Playing control with STM32F407 - automatic tuning of PID parameters using relay feedback method

Previous article:Playing control with STM32F407 - PID parameter automatic tuning by mode identification method
Next article:Playing Control with STM32F407 - Smith Predictive Compensation Control

Recommended ReadingLatest update time:2024-11-25 04:12

STM32F407 and STM32F051 master-slave I2C communication method
M4 as host:   int main(void)   {   /* USER CODE BEGIN 1 */   /* USER CODE END 1 */   HAL_Init();   /* Configure the system clock */   SystemClock_Config();   /* Initialize all configured peripherals */   MX_GPIO_Init();   MX_I2C1_Init();   MX_USART1_UART_Init();   /* USER CODE BEGIN 2 */   /* USER CODE END 2 */   /* I
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号